great-ai/good_ai/tests/sus/test_get_sentences.py
András Schmelczer 83d870d2ea More experimentation
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
2022-04-03 21:46:35 +02:00

16 lines
622 B
Python

import unittest
from src.good_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), [])