예제 #1
0
 def test_word_suffix(self):
     sentence = "feel"
     self.assertFalse(has_word("eel", sentence))
예제 #2
0
 def test_word_prefix(self):
     sentence = "She helped me learn French"
     self.assertFalse(has_word("help", sentence))
예제 #3
0
 def test_punctuation(self):
     sentence = "Help! I need somebody."
     self.assertTrue(has_word("help", sentence))
예제 #4
0
 def test_whole_word_mid_sentence(self):
     sentence = "She was a big help when I learned French"
     self.assertTrue(has_word("help", sentence))
예제 #5
0
 def test_different_capitalization(self):
     sentence = "Help"
     self.assertTrue(has_word("help", sentence))
예제 #6
0
 def test_just_the_word(self):
     sentence = "help"
     self.assertTrue(has_word("help", sentence))