def test_split_sentences_trailing(self): self.assertEquals(lipsum._split_sentences("Hello. Hi. Hello"), ["Hello", "Hi", "Hello"]) self.assertEquals(lipsum._split_sentences(" Hello. Hi. Hello "), ["Hello", "Hi", "Hello"]) self.assertEquals(lipsum._split_sentences(".. Hello... Hi.... Hello "), ["Hello", "Hi", "Hello"])
def test_split_sentences(self): self.assertEquals(lipsum._split_sentences("Hello. Hi."), ["Hello", "Hi"]) self.assertEquals(lipsum._split_sentences(self.sample), ["One two three four five six", "Seven eight nine ten eleven twelve", "Thirteen fourteen fifteen sixteen", "Seventeen eighteen nineteen twenty"])
def test_split_sentences_empty(self): self.assertEquals(lipsum._split_sentences(""), [])