示例#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'))