Ejemplo n.º 1
0
def test_select_random_word_with_one_word(): #pass
    list_of_words = ['rmotr']
    word_to_guess = HangmanGame.select_random_word(list_of_words)
    assert word_to_guess == 'rmotr'
Ejemplo n.º 2
0
def test_select_random_word_with_many_words(): #pass
    list_of_words = ['rmotr', 'python', 'intro']
    word_to_guess = HangmanGame.select_random_word(list_of_words)
    assert word_to_guess in list_of_words
Ejemplo n.º 3
0
def test_select_random_word_with_empty_list(): #pass
    with pytest.raises(InvalidListOfWordsException):
        HangmanGame.select_random_word([])
Ejemplo n.º 4
0
def test_select_random_word_with_one_word():
    list_of_words = ['asdd']
    word_to_guess = HangmanGame.select_random_word(list_of_words)
    assert word_to_guess == 'asdd'