def test_not_contain_unique_word(self):
     counter = WordCounter("green bar green hat")
     self.assertNotIn("foo", counter.unique_words())
 def test_find_number_of_unique_words(self):
     counter = WordCounter("green bar green hat")
     self.assertEqual(3, len(counter.unique_words()))
Esempio n. 3
0
 def test_count_unique_words_case_insensitive(self):
     counter = WordCounter("green bar Green hat")
     self.assertEqual(["bar", "green", "hat"], counter.unique_words())