Exemple #1
0
 def test_letter_none(self):
     next_sentence = "aaa"
     letter = None
     p = VincentExtractor()
     expected_result = ["aaa"]
     actual_result = p.test_add_sentence(next_sentence, letter)
     self.assertTrue(expected_result == actual_result)
Exemple #2
0
 def test_add_empty_next_sentence(self):
     letter = XMLData("b", 10.0, 10.0, "Font", 23.0, True, False)
     next_sentence = ""
     p = VincentExtractor()
     expected_result = ["b"]
     actual_result = p.test_add_sentence(next_sentence, letter)
     self.assertTrue(expected_result == actual_result)
Exemple #3
0
    def test_none_next_sentence(self):
        captured_output = io.StringIO()
        sys.stdout = captured_output

        letter = XMLData("b", 10.0, 10.0, "Font", 23.0, True, False)
        next_sentence = None
        p = VincentExtractor()
        expected_result = []
        actual_result = p.test_add_sentence(next_sentence, letter)

        sys.stdout = sys.__stdout__

        self.assertTrue(expected_result == actual_result)