コード例 #1
0
def test_wordcount2():
    result = p2_wordcount.wordcount("1,336,472")
    assert result == 1
コード例 #2
0
def test_wordcount1():
    result = p2_wordcount.wordcount("Greetings!   ")
    assert result == 1
コード例 #3
0
def test_wordcount3():
    result = p2_wordcount.wordcount("!!H!! is a word")
    assert result == 4
コード例 #4
0
 def test_wordcount2(self):
     result = p2_wordcount.wordcount("Hello, there are 3 cows!")
     self.assertEqual(result, 5)
コード例 #5
0
 def test_wordcount1(self):
     result = p2_wordcount.wordcount("Hello world!")
     self.assertEqual(result, 2)
コード例 #6
0
 def test_wordcount3(self):
     result = p2_wordcount.wordcount("!@#$%^&*() ")
     self.assertEqual(result, 0)