def test_when_words_are_not_same_length(): assert not hangman.match_with_gaps('w_ _ d', 'words')
def test_when_length_same_but_words_dont_match(): assert not hangman.match_with_gaps('lea_ y', 'leafs')
def test_when_other_word_has_leading_and_trailing_spaces(): assert hangman.match_with_gaps('w_ _ d', ' word ')
def test_match_with_gaps(self): my_word = 't_ a_ n_ r' other_word = 'trainer' result = hngmn.match_with_gaps(my_word, other_word) print("\t Testing match_with_gaps ") self.assertEqual(result, True)
def test_match_with_gaps(self): word_so_far = 't_ a_ n_ r' other_word = 'trainer' result = hngmn.match_with_gaps(word_so_far, other_word) print("\t Testing is_word_guessed") self.assertEqual(result, True)
def test_match_with_gaps(self): self.assertFalse(match_with_gaps('te_ t', 'tact')) self.assertFalse(match_with_gaps('a_ _ le', 'banana')) self.assertTrue(match_with_gaps('a_ _ le', 'apple')) self.assertFalse(match_with_gaps('a_ ple', 'apple'))