def test_a_count_of_words(self):
        self._write("Keep the bar green to keep the code clean.", TEST_FILE)

        counter = WordCounter.load(TEST_FILE)
        self.assertEqual(9, counter.number_of_words())

        os.remove(TEST_FILE)
Example #2
0
 def word_count_of_missing_file():
     WordCounter.load("DoesNotExist.txt")
 def test_containment_of_word(self):
     counter = WordCounter.load(TEST_FILE)
 def test_count_of_words_better(self):
     counter = WordCounter.load(TEST_FILE)