Fix tests

This commit is contained in:
Andras Schmelczer 2022-05-25 19:49:14 +02:00
parent 00353837b4
commit 89661e8fbc
No known key found for this signature in database
GPG key ID: 39260B5B0614A13E
18 changed files with 14 additions and 16 deletions

View file

@ -1,17 +0,0 @@
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), [])