def test_wordCount(self):
     self.assertEqual(word_count.wordCount("3 Word Sentence"), 3)
     self.assertEqual(word_count.wordCount("OneWordLongSentence"), 1)
     self.assertEqual(word_count.wordCount(""), 0)
     self.assertEqual(word_count.wordCount("This sentence will fail"), 7)
Exemplo n.º 2
0
 def test_word_count(self):
     Var = word_count.wordCount("hiroto kazama")
     self.assertEqual(Var, 2)
Exemplo n.º 3
0
 def test_word_count_2(self):
     Var = word_count.wordCount("test test test test")
     self.assertEqual(Var, 4)
Exemplo n.º 4
0
def test_zero():
    assert word_count.wordCount("") == 0
Exemplo n.º 5
0
def test_word_count():
    assert word_count.wordCount("This is for testing") == 4
Exemplo n.º 6
0
def test_four():
    assert word_count.wordCount("Four word long sentence") == 4
Exemplo n.º 7
0
def test_failed():
    assert word_count.wordCount("This sentence will fail") == 7
 def test_symbols2(self):
     self.assertEqual(word_count.wordCount("#why *here *sus"), 3)
 def test_symbols(self):
     self.assertEqual(word_count.wordCount("I am here!"), 3)
 def test_numbers(self):
     self.assertEqual(word_count.wordCount("Yes1 fire2 random words3"), 4)