def test_functions(): assert is_word_guessed("road", ["r", "o", "a", "d"]) == True assert is_word_guessed("road", ["r", "o", "v", "d"]) == False assert get_guessed_word("d", "dog", ['_', 'o', 'g']) == ['d', 'o', 'g'] assert get_guessed_word("e", "car", ['_', 'a', 'r']) == ['_', 'a', 'r'] assert is_guess_in_word("t", "tailor") == True assert is_guess_in_word("r", "late") == False
def test_is_guess_in_word(): assert is_guess_in_word("ta", "task") assert is_guess_in_word( "1", "ice") == False, "Invalid user input, number letter" assert is_guess_in_word(" ", "car") == False, "Invalid user input, white space" assert is_guess_in_word( "ascasdc", "house") == False, "Invalid user input, incorrect guess"
def test_is_guess_in_word(): # tests if the character shows up in the word assert is_guess_in_word("i", "boiling") == True assert is_guess_in_word("d", "door") == True assert is_guess_in_word("x", "awkward") == False assert is_guess_in_word("q", "shame") == False
def test_is_guess_in_word(): assert is_guess_in_word( 'a', 'baloney' ) == True, 'is_guess_in_word() Error: new input in letters_guessed matches secret_word' assert is_guess_in_word( 'g', 'baloney' ) == False, 'is_guess_in_word() Error: duplicate input in letters_guessed' assert is_guess_in_word( 't', 'baloney' ) == False, 'is_guess_in_word() Error: new input in letters_guessed, does not match secret_word'
def test_correct(self): """ >>> is_guess_in_word('a' 'waffles') >>> True """ word = 'waffles' guess = 'a' self.assertTrue(is_guess_in_word(guess, word), True)
def test_incorrect(self): """ >>> is_guess_in_word('y', 'Alan') >>> False """ word = 'Alan' guess = 'y' self.assertFalse(is_guess_in_word(guess, word), False)
def test_is_guess_in_word(): # A function to check if the guessed letter is in the secret word guess = 'd' secret_word = 'desk' assert is_guess_in_word( guess, secret_word) == True, 'guess_in_word is not working as intended'
def test_empty(self): """ >>> is_guess_in_word('break', '') >>> False """ word = 'break' guess = '' self.assertFalse(is_guess_in_word(guess, word), False)
def test_integer(self): """ >>> is_guess_in_word(90, 'cat') >>> False """ word = 'cat' guess = 90 self.assertFalse(is_guess_in_word(guess, word), False)
def test_is_guess_in_word(self): """ This function will test the is_guess_in_word function Args: secret_word(string) Returns: True if letters_guessed is in secret_word """ secret_word = "test" self.assertEqual(is_guess_in_word('e', secret_word), True)
def test_is_guess_in_word_option_upper(self): self.assertEqual(is_guess_in_word("Q", "fact"), "Q")
def test_is_guess_in_word(): assert is_guess_in_word("r", "read") == True assert is_guess_in_word("x", "read") == False
def test_is_guess(): """A test function for is_guess_in_word().""" result = spaceman.is_guess_in_word("l", "love") assert result
def test_is_guess_in_word( self): #tests to see if user letter guessed is correct assert spaceman.is_guess_in_word(("a"), ('art')) is True assert spaceman.is_guess_in_word(("b"), ('art')) is False
def test_is_guess_in_word(): assert is_guess_in_word('a', 'abhi') is True assert is_guess_in_word('n', 'apple') is False
def test_is_guess_in_word(self): self.assertEqual(is_guess_in_word('v', 'volatile'), True) self.assertEqual(is_guess_in_word('d', 'pop'), False)
def test_is_guess_in_word_true(self): self.assertEqual(is_guess_in_word("t", "fact"), "t")
def test_is_guess_in_word(self): # true cases + 2 assert is_guess_in_word("r", "mark") == True # false cases + 2 #def test_is_guess_in_word(self) assert is_guess_in_word("1", "bob") == False
def test_is_guess_in_word(): assert is_guess_in_word('a', 'bananas') == True assert is_guess_in_word('e', 'car') == False assert is_guess_in_word('1', 'feud') == False
def test_is_guess_in_word_false(self): self.assertEqual(is_guess_in_word("r", "fact"), "~")
def test_is_guess_in_word(): assert is_guess_in_word(('a'), ('apple')) is True assert is_guess_in_word(('b'), ('banana')) is True assert is_guess_in_word(('c'), ('carrot')) is True
def tests_is_guess_in_word(self): assert spaceman.is_guess_in_word("a", "a") == True
def test_is_guess_in_word(self): assert is_guess_in_word('m', 'modelicious') == True
def test_is_guess_in_word(self): assert is_guess_in_word('a', 'Rathalos') == True assert is_guess_in_word('X', 'Teostra') == False
def test_is_guess_in_word(): assert spaceman.is_guess_in_word('a', 'word') == False assert spaceman.is_guess_in_word('o', 'word') == True assert spaceman.is_guess_in_word('w', 'word') == True
def test_is_guess_in_word(self): assert is_guess_in_word('a', ['c', 'a', 't']) is True
def test_is_guess_in_word(): assert is_guess_in_word('a', 'orange') == True assert is_guess_in_word('o', 'apple') == False
def test_is_guess_in_word(): assert is_guess_in_word('c', 'ficticious') == True assert is_guess_in_word('$', 'ficticious') == False assert is_guess_in_word('1', 'ficticious') == False assert is_guess_in_word('a', 'ficticious') == False assert is_guess_in_word('C', 'ficticious') == True
def test_guess_in_word(): secret_word = 'bat' assert is_guess_in_word('b', secret_word) == True assert is_guess_in_word('s', secret_word) == False
def test_is_guess_in_word(self): assert is_guess_in_word('i', ['f', 'i', 's', 'h']) is True