def test_get_result_win(attempts_number):
    game = create_game()
    game.guess_count = attempts_number 
    answer = game.answer
    game.guessed_letters = list(answer)
    assert game.get_result() == Result.WIN
def test_get_result_continue(attempts_number):
    game = create_game()
    game.guess_count = attempts_number 
    assert game.get_result() == Result.CONTINUE
def test_get_result_fail(attempts_number):
    game = create_game()
    game.guess_count = attempts_number 
    assert game.get_result() == Result.FAIL
def test_guess_game_over():
    game = create_game()
    game.guess_count = MAX_AMOUNT_OF_ATTEMPS + 1
    with pytest.raises(ValueError):
        game.guess("a")
def test_guess_not_a_letter():
    game = create_game()
    with pytest.raises(ValueError):
        game.guess("1")
def test_create_game():
    game = create_game()
    assert game.answer in WORDS_LIST
    assert game.guess_count == 0
    assert game.guessed_letters == []