コード例 #1
0
 def test_count_th_empty(self):
     self.word = ""
     count = count_th(self.word)
     self.assertEqual(0, count)
コード例 #2
0
 def test_count_th_mixedcase(self):
     self.word = "THtHThth"
     count = count_th(self.word)
     self.assertEqual(1, count)
コード例 #3
0
 def test_count_th_multiple(self):
     self.word = "abcthefthghith"
     count = count_th(self.word)
     self.assertEqual(3, count)
コード例 #4
0
 def test_count_backwards(self):
     self.word = "thhtthht"
     count = count_th(self.word)
     self.assertEqual(2, count)
コード例 #5
0
 def test_count_th_single(self):
     self.word = "abcthxyz"
     count = count_th(self.word)
     self.assertEqual(1, count)