コード例 #1
0
def test_calcualte_score_negative():
    score = calculate_score(5)
    assert score == 0
コード例 #2
0
def test_calcualte_score_positive():
    score = calculate_score(1)
    assert score == 3
コード例 #3
0
def test_2_duplicate_letters():
    assert hangman.calculate_score(1, "oddo") == 2
コード例 #4
0
def test_3_letter_word_2_duplicate_letters():
    assert hangman.calculate_score(6, "add") == 12
コード例 #5
0
def test_2_letter_word_score_greater_than_1():
    assert hangman.calculate_score(4, "ad") == 8
コード例 #6
0
def test_no_duplicate_letters_score_greater_than_1():
    assert hangman.calculate_score(3, "castle") == 18
コード例 #7
0
def test_no_duplicate_letters():
    assert hangman.calculate_score(1, "castle") == 6