Add files
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
commit
d79a75d352
102 changed files with 24317 additions and 0 deletions
16
good_ai/tests/sus/test_get_sentences.py
Normal file
16
good_ai/tests/sus/test_get_sentences.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import unittest
|
||||
|
||||
from src.sus.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