def test_local_sentence_count(self): aSection = Section('aTitle', 1) aSection.add_paragraph('This is a single sentence.') self.assertEqual(aSection.get_sentence_count(), 1) aSection.add_paragraph( 'This adds a second, and third, sentence. How is the weather today?' ) self.assertEqual(aSection.get_sentence_count(), 3)
def test_deep_sentence_count(self): aSection = Section('aTitle', 1) subSection = aSection.add_subsection('other', 2) aSection.add_paragraph( 'This is the first sections paragraph. And a second sentence.') subSection.add_paragraph( 'This is a sub section paragraph. The weather today is fairly nice.' ) self.assertEqual(aSection.get_sentence_count(), 4)