Fix tests
This commit is contained in:
parent
00353837b4
commit
89661e8fbc
18 changed files with 14 additions and 16 deletions
16
great_ai/tests/utilities/test_get_sentences.py
Normal file
16
great_ai/tests/utilities/test_get_sentences.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import unittest
|
||||
|
||||
from src.great_ai.utilities.get_sentences import get_sentences
|
||||
|
||||
|
||||
class TestGetSentences(unittest.TestCase):
|
||||
def test_default(self) -> None:
|
||||
text = "This is a complete sentence. So is this. However this is n" # ot.
|
||||
expected = ["This is a complete sentence.", "So is this.", "However this is n"]
|
||||
|
||||
self.assertEqual(get_sentences(text), expected)
|
||||
self.assertEqual(get_sentences(text, ignore_partial=True), expected[0:2])
|
||||
|
||||
def test_empty(self) -> None:
|
||||
self.assertEqual(get_sentences(""), [])
|
||||
self.assertEqual(get_sentences("", ignore_partial=True), [])
|
||||
Loading…
Add table
Add a link
Reference in a new issue