def testIgnoresNewlines(self): word_list = {'a': 1} to_test = """a """ self.assertDictEqual(w.add_to_word_counter(to_test, word_list), {'a': 2})
def testIgnoresPunctuation(self): word_list = {'a': 1} self.assertDictEqual(w.add_to_word_counter(".a", word_list), {'a': 2})
def testIgnoresCase(self): word_list = {'a': 1} self.assertDictEqual(w.add_to_word_counter("A", word_list), {'a': 2})
def testCreatesWordIfNotInDict(self): word_list = {} self.assertDictEqual(w.add_to_word_counter("a", word_list), {'a': 1})
def testAddsOneWordToCounter(self): word_list = {'a': 2} self.assertDictEqual(w.add_to_word_counter("a", word_list), {'a': 3})
def testAddingNoWordsAddsNoWords(self): word_list = {'a': 3} self.assertDictEqual(w.add_to_word_counter("", word_list), word_list)