예제 #1
0
 def test_failFast(self):
     sample = "public Album"
     counter = WordCounter()
     counter.count(sample)
     self.assertEqual(1, counter.timesOccurred('public'))
예제 #2
0
 def test_counts_words_despite_punctuation(self):
     counter = WordCounter()
     counter.count("Album album = new ALBUM()")
     self.assertEqual(3, counter.timesOccurred('album'))
예제 #3
0
 def test_differentCase(self):
     counter = WordCounter()
     counter.count("Album album ALBUM")
     self.assertEqual(3, counter.timesOccurred('album'))
예제 #4
0
 def test_failFast(self):
     sample = "public Album"
     counter = WordCounter()
     counter.count(sample)
     self.assertEqual(1, counter.timesOccurred('public'))
예제 #5
0
 def test_counts_words_despite_punctuation(self):
     counter = WordCounter()
     counter.count("Album album = new ALBUM()")
     self.assertEqual(3, counter.timesOccurred('album'))
예제 #6
0
 def test_differentCase(self):
     counter = WordCounter()
     counter.count("Album album ALBUM")
     self.assertEqual(3, counter.timesOccurred('album'))