Ejemplo n.º 1
0
    def test_Word_eq(self):
        test_word = " Bill ., "
        self.word.text = test_word
        word2 = Word(test_word)

        self.assertEqual(self.word, word2)
        self.assertEqual(self.word.text, word2.text)
Ejemplo n.º 2
0
    def test_init(self):
        """"Tests init correcting .text params"""
        self.word = Word("Bill .,")
        self.sentence = Sentence(" Bill is cool. ")

        self.assertEqual(self.word.text, "Bill")
        self.assertEqual(self.sentence.text, "Bill is cool.")
Ejemplo n.º 3
0
 def setUp(self):
     self.word = Word("")
     self.sentence = Sentence("")