예제 #1
0
def test_hide_fifth_guess():
    sw = "elephant"
    assert hide_word(sw,['e','l','p','h','a']) == "elepha__"
예제 #2
0
def test_hide_seventh_guess():
    sw = "elephant"
    assert hide_word(sw,['e','l','p','h','a','n','t']) == "elephant"
예제 #3
0
def test_hide_word_third_guess():
    sw = "elephant"
    assert hide_word(sw,['e','l','p']) == "elep____"
예제 #4
0
def test_hide_fourth_guess():
    sw = "elephant"
    assert hide_word(sw,['e','l','p','h']) == "eleph___"
예제 #5
0
def test_hide_word_first_guess():
    sw = "elephant"
    assert hide_word(sw, ['l']) == "_l______"
예제 #6
0
def test_hide_word_second_guess():
    sw = "elephant"
    assert hide_word(sw,['e','l']) == "ele_____"
예제 #7
0
def test_display_secret_phrase_with_spaces(setup):
    hangman.secret = 'FOR THE WIN'
    hangman.correct_letters = ['T', 'N']

    assert '- - -   T - -   - - N' == hangman.hide_word()
예제 #8
0
def test_hide_word_empty():
    sw = "elephant"
    assert hide_word(sw,[]) == "________"
예제 #9
0
def test_display_secret_with_guesses(setup):
    hangman.secret = 'PYTHON'
    hangman.correct_letters = ['T', 'N']

    assert '- - T - - N' == hangman.hide_word()
예제 #10
0
def test_display_secret_with_no_guesses(setup):
    hangman.secret = 'PYTHON'

    assert '- - - - - -' == hangman.hide_word()
예제 #11
0
def test_hide_word_2():
    assert hangman.hide_word("elephant", ['l','e','z']) == "ele_____"
예제 #12
0
def test_hide_word_single_correct_guess():
    assert hangman.hide_word("elephant",['l']) == "_l______"
예제 #13
0
def test_hide_word_no_guesses():
    assert hangman.hide_word("elephant",[]) == "________"