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_word_guessed(): assert is_word_guessed('baloney', 'baloney') == True, 'Error: should return true' assert is_word_guessed( 'baloney', 'blanoey') == True, 'Error: same letters, different order'
def test_is_word_guessed(): # Tests if the words match each other assert is_word_guessed("hello", "hello") == True assert is_word_guessed("bod", "bot") == False assert is_word_guessed("wall", "wall") == True assert is_word_guessed("rob", "bol") == False
def test_partial(self): """ >>> is_word_guessed('cat, ['a','t']) >>> False """ word = 'cat' arr = ['a', 't'] self.assertFalse(is_word_guessed(word, arr), False)
def test_empty(self): """ >>> is_word_guessed('bacon', []) >>> False """ word = 'bacon' arr = [] self.assertFalse(is_word_guessed(word, arr), False)
def test_arr_of_integers(self): """ >>> is_word_guessed('cat, ['1','79']) >>> False """ word = 'gary' arr = [1, 79] self.assertFalse(is_word_guessed(word, arr), False)
def test_is_word_guessed(): # Set up secret_word = 'cat' letters_guessed = ['c','a','t'] #test assert is_word_guessed( secret_word, letters_guessed) == True, 'is_word_guessed function is not working as intended'
def test_all_words(self): """ >>> is_word_guessed("happy", ['h','p','p','a','y']) >>> True """ word = 'happy' arr = ['h', 'p', 'p', 'a', 'y'] self.assertTrue( is_word_guessed(word, arr), True ) # try all letters of and array containing all letters of the word
def test_is_word_guessed(self): """This test will run using the is_word_guessed function Args: letters_guessed(string) secret_word(string) Returns: True if letters are in secret word """ secret_word = ['pillow'] letters_guessed = ['p', 'i', 'l', 'l', 'o', 'w'] self.assertEqual(is_word_guessed(secret_word, letters_guessed), False)
def test_is_word_guessed(): assert is_word_guessed('waterfall', 'waterfall') == True assert is_word_guessed('waterfall', 'waterfal') == False assert is_word_guessed('waterfall', 'wtrfll') == False
def test_is_word_guessed(self): self.assertEqual(is_word_guessed("wood", ["w", "o", "o", "d"]), True) self.assertEqual(is_word_guessed("wood", ["e", "o", "o", "d"]), False)
def test_is_word_guessed(): assert is_word_guessed("read", "read") == True assert is_word_guessed("read", "reed") == False
def test_is_word_guessed(): assert spaceman.is_word_guessed('apple', 'apl') == False assert spaceman.is_word_guessed('banana', 'ban') == True assert spaceman.is_word_guessed('cat', 'c') == False
def test_is_word_guessed(): assert is_word_guessed("mississipi", ['m', 's', 'p', 'i']) is True assert is_word_guessed("precedes", ['p', 'r', 'e', 'c', 'd']) is False
def test_is_word_guessed_true(self): self.assertEqual(is_word_guessed("cat", "act"), True)
def test_is_word_not_guessed(self): self.assertEqual(is_word_guessed("cat", "tar"), False)
def test_is_word_guessed(): assert is_word_guessed(('breast'),['b','r','e','a','s','t']) is True assert is_word_guessed(('eggs'),['e','g','g','s']) is True assert is_word_guessed(('butter'),['b','u','t','t','e','r']) is True
def test_is_word_guessed(self): # true case #3 assert is_word_guessed("new york", "califoniah") == False
def test_is_word_guessed(self): fake_word = "Chu" letters_guessed = ["a", "b", "c"] self.assertEqual(is_word_guessed(fake_word, letters_guessed), False)
def test_is_word_guessed(): assert is_word_guessed('panda', ['a', 'b', 's', 'r', 'p']) == False assert is_word_guessed('arch', ['s', 'n', 'r', 'p', 'a', 'e', 'c', 'h']) == True
def test_is_word_guessed(self): assert is_word_guessed('dog', 'cat') is False
def tests_is_word_guessed(selfself): assert spaceman.is_word_guessed("a", {"a"}) == True assert spaceman.is_word_guessed("a", {"b"}) == False
def test_is_word_guessed_more_letters(self): self.assertEqual(is_word_guessed("cat", "track"), True)
def test_is_word_guessed(): assert is_word_guessed('apple', 'apple') == True assert is_word_guessed('muy', 'bien') == False
def test_is_word_guessed(self): assert is_word_guessed('yoma', 'yom') == False
def test_is_word_guessed(self): assert is_word_guessed('fish', 'fish') is True assert is_word_guessed('NO', 'Yes') is False
def test_is_word_guessed_no_letters(self): self.assertEqual(is_word_guessed("cat", ""), False)
def test_word_guessed(): secret_word = 'rat' assert is_word_guessed(secret_word, 'r') == True assert is_word_guessed(secret_word, 'l') == False
def test_is_word_guessed(): assert is_word_guessed( 'test', 'test') == True, 'is_word_guessed() Error: word == word'