Exemplo n.º 1
0
def test_pair6():
    roll = [6, 3, 3, 4, 6]
    expected_score = 12

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 2
0
def test_fives1():
    roll = [5, 1, 2, 5, 4]
    expected_score = 10

    score = yatzy.getScore(roll, Category.FIVES)
    assert score == expected_score
Exemplo n.º 3
0
def test_pair5():
    roll = [1, 1, 3, 4, 5]
    expected_score = 2

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 4
0
def test_full_house1():
    roll = [1, 1, 2, 2, 2]
    expected_score = 8

    score = yatzy.getScore(roll, Category.FULLHOUSE)
    assert score == expected_score
Exemplo n.º 5
0
def test_ones1():
    roll = [3, 3, 3, 4, 5]
    expected_score = 0

    score = yatzy.getScore(roll, Category.ONES)
    assert score == expected_score
Exemplo n.º 6
0
def test_three_of_a_kind3():
    roll = [3, 3, 3, 3, 1]
    expected_score = 9

    score = yatzy.getScore(roll, Category.THREEOFAKIND)
    assert score == expected_score
Exemplo n.º 7
0
def test_small_straight2():
    roll = [1, 2, 6, 4, 5]
    expected_score = 0

    score = yatzy.getScore(roll, Category.SMALLSTRAIGHT)
    assert score == expected_score
Exemplo n.º 8
0
def test_chance2():
    roll = [4, 5, 5, 6, 1]
    expected_score = 21

    score = yatzy.getScore(roll, Category.CHANCE)
    assert score == expected_score
Exemplo n.º 9
0
def test_three_of_a_kind3():
    roll = [3, 3, 3, 3, 1]
    expected_score = 9

    score = yatzy.getScore(roll, Category.THREEOFAKIND)
    assert score == expected_score
Exemplo n.º 10
0
def test_two_pair4():
    roll = [1, 3, 6, 1, 3]
    expected_score = 8

    score = yatzy.getScore(roll, Category.TWOPAIRS)
    assert score == expected_score
Exemplo n.º 11
0
def test_two_pair5():
    roll = [3, 3, 3, 3, 3]
    expected_score = 0

    score = yatzy.getScore(roll, Category.TWOPAIRS)
    assert score == expected_score
Exemplo n.º 12
0
def test_two_pair3():
    roll = [1, 1, 2, 2, 2]
    expected_score = 6

    score = yatzy.getScore(roll, Category.TWOPAIRS)
    assert score == expected_score
Exemplo n.º 13
0
def test_pair7():
    roll = [3, 5, 3, 5, 1]
    expected_score = 10

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 14
0
def test_pair6():
    roll = [6, 3, 3, 4, 6]
    expected_score = 12

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 15
0
def test_two_pair3():
    roll = [1, 1, 2, 2, 2]
    expected_score = 6

    score = yatzy.getScore(roll, Category.TWOPAIRS)
    assert score == expected_score
Exemplo n.º 16
0
def test_three_of_a_kind4():
    roll = [1, 1, 3, 6, 1]
    expected_score = 3

    score = yatzy.getScore(roll, Category.THREEOFAKIND)
    assert score == expected_score
Exemplo n.º 17
0
def test_two_pair5():
    roll = [3, 3, 3, 3, 3]
    expected_score = 0

    score = yatzy.getScore(roll, Category.TWOPAIRS)
    assert score == expected_score
Exemplo n.º 18
0
def test_three_of_a_kind5():
    roll = [5, 5, 5, 5, 5]
    expected_score = 15

    score = yatzy.getScore(roll, Category.THREEOFAKIND)
    assert score == expected_score
Exemplo n.º 19
0
def test_three_of_a_kind5():
    roll = [5, 5, 5, 5, 5]
    expected_score = 15

    score = yatzy.getScore(roll, Category.THREEOFAKIND)
    assert score == expected_score
Exemplo n.º 20
0
def test_four_of_a_kind4():
    roll = [2, 2, 3, 2, 2]
    expected_score = 8

    score = yatzy.getScore(roll, Category.FOUROFAKIND)
    assert score == expected_score
Exemplo n.º 21
0
def test_large_straight2():
    roll = [3, 2, 6, 4, 6]
    expected_score = 0

    score = yatzy.getScore(roll, Category.LARGESTRAIGHT)
    assert score == expected_score
Exemplo n.º 22
0
def test_small_straight2():
    roll = [1, 2, 6, 4, 5]
    expected_score = 0

    score = yatzy.getScore(roll, Category.SMALLSTRAIGHT)
    assert score == expected_score
Exemplo n.º 23
0
def test_full_house4():
    roll = [4, 4, 4, 4, 4]
    expected_score = 0

    score = yatzy.getScore(roll, Category.FULLHOUSE)
    assert score == expected_score
Exemplo n.º 24
0
def test_small_straight3():
    roll = [5, 3, 2, 1, 4]
    expected_score = 15

    score = yatzy.getScore(roll, Category.SMALLSTRAIGHT)
    assert score == expected_score
Exemplo n.º 25
0
def test_threes1():
    roll = [1, 1, 2, 4, 4]
    expected_score = 0

    score = yatzy.getScore(roll, Category.THREES)
    assert score == expected_score
Exemplo n.º 26
0
def test_large_straight2():
    roll = [3, 2, 6, 4, 6]
    expected_score = 0

    score = yatzy.getScore(roll, Category.LARGESTRAIGHT)
    assert score == expected_score
Exemplo n.º 27
0
def test_pair2():
    roll = [1, 1, 6, 2, 6]
    expected_score = 12

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 28
0
def test_large_straight3():
    roll = [5, 6, 3, 2, 4]
    expected_score = 20

    score = yatzy.getScore(roll, Category.LARGESTRAIGHT)
    assert score == expected_score
Exemplo n.º 29
0
def test_pair5():
    roll = [1, 1, 3, 4, 5]
    expected_score = 2

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 30
0
def test_full_house1():
    roll = [1, 1, 2, 2, 2]
    expected_score = 8

    score = yatzy.getScore(roll, Category.FULLHOUSE)
    assert score == expected_score
Exemplo n.º 31
0
def test_pair7():
    roll = [3, 5, 3, 5, 1]
    expected_score = 10

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 32
0
def test_full_house2():
    roll = [6, 4, 6, 4, 6]
    expected_score = 26

    score = yatzy.getScore(roll, Category.FULLHOUSE)
    assert score == expected_score
Exemplo n.º 33
0
def test_two_pair4():
    roll = [1, 3, 6, 1, 3]
    expected_score = 8

    score = yatzy.getScore(roll, Category.TWOPAIRS)
    assert score == expected_score
Exemplo n.º 34
0
def test_full_house4():
    roll = [4, 4, 4, 4, 4]
    expected_score = 0

    score = yatzy.getScore(roll, Category.FULLHOUSE)
    assert score == expected_score
Exemplo n.º 35
0
def test_chance2():
    roll = [4, 5, 5, 6, 1]
    expected_score = 21

    score = yatzy.getScore(roll, Category.CHANCE)
    assert score == expected_score
Exemplo n.º 36
0
def test_yatzy2():
    roll = [1, 1, 1, 2, 1]
    expected_score = 0

    score = yatzy.getScore(roll, Category.YATZY)
    assert score == expected_score
Exemplo n.º 37
0
def test_three_of_a_kind4():
    roll = [1, 1, 3, 6, 1]
    expected_score = 3

    score = yatzy.getScore(roll, Category.THREEOFAKIND)
    assert score == expected_score
Exemplo n.º 38
0
def test_ones1():
    roll = [3, 3, 3, 4, 5]
    expected_score = 0

    score = yatzy.getScore(roll, Category.ONES)
    assert score == expected_score
Exemplo n.º 39
0
def test_four_of_a_kind4():
    roll = [2, 2, 3, 2, 2]
    expected_score = 8

    score = yatzy.getScore(roll, Category.FOUROFAKIND)
    assert score == expected_score
Exemplo n.º 40
0
def test_twos1():
    roll = [3, 3, 3, 4, 5]
    expected_score = 0

    score = yatzy.getScore(roll, Category.TWOS)
    assert score == expected_score
Exemplo n.º 41
0
def test_small_straight3():
    roll = [5, 3, 2, 1, 4]
    expected_score = 15

    score = yatzy.getScore(roll, Category.SMALLSTRAIGHT)
    assert score == expected_score
Exemplo n.º 42
0
def test_threes1():
    roll = [1, 1, 2, 4, 4]
    expected_score = 0

    score = yatzy.getScore(roll, Category.THREES)
    assert score == expected_score
Exemplo n.º 43
0
def test_large_straight3():
    roll = [5, 6, 3, 2, 4]
    expected_score = 20

    score = yatzy.getScore(roll, Category.LARGESTRAIGHT)
    assert score == expected_score
Exemplo n.º 44
0
def test_fours1():
    roll = [1, 1, 2, 4, 4]
    expected_score = 8

    score = yatzy.getScore(roll, Category.FOURS)
    assert score == expected_score
Exemplo n.º 45
0
def test_full_house2():
    roll = [6, 4, 6, 4, 6]
    expected_score = 26

    score = yatzy.getScore(roll, Category.FULLHOUSE)
    assert score == expected_score
Exemplo n.º 46
0
def test_fives1():
    roll = [5, 1, 2, 5, 4]
    expected_score = 10

    score = yatzy.getScore(roll, Category.FIVES)
    assert score == expected_score
Exemplo n.º 47
0
def test_yatzy2():
    roll = [1, 1, 1, 2, 1]
    expected_score = 0

    score = yatzy.getScore(roll, Category.YATZY)
    assert score == expected_score
Exemplo n.º 48
0
def test_sixes1():
    roll = [1, 1, 2, 4, 4]
    expected_score = 0

    score = yatzy.getScore(roll, Category.SIXES)
    assert score == expected_score
Exemplo n.º 49
0
def test_twos1():
    roll = [3, 3, 3, 4, 5]
    expected_score = 0

    score = yatzy.getScore(roll, Category.TWOS)
    assert score == expected_score
Exemplo n.º 50
0
def test_pair1():
    roll = [3, 3, 3, 4, 4]
    expected_score = 8

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 51
0
def test_fours1():
    roll = [1, 1, 2, 4, 4]
    expected_score = 8

    score = yatzy.getScore(roll, Category.FOURS)
    assert score == expected_score
Exemplo n.º 52
0
def test_pair2():
    roll = [1, 1, 6, 2, 6]
    expected_score = 12

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 53
0
def test_sixes1():
    roll = [1, 1, 2, 4, 4]
    expected_score = 0

    score = yatzy.getScore(roll, Category.SIXES)
    assert score == expected_score
Exemplo n.º 54
0
def test_chance1():
    roll = [1, 1, 3, 3, 6]
    expected_score = 14

    score = yatzy.getScore(roll, Category.CHANCE)
    assert score == expected_score
Exemplo n.º 55
0
def test_pair3():
    roll = [3, 3, 3, 4, 1]
    expected_score = 6

    score = yatzy.getScore(roll, Category.PAIR)
    assert score == expected_score
Exemplo n.º 56
0
def test_chance1():
    roll = [1, 1, 3, 3, 6]
    expected_score = 14

    score = yatzy.getScore(roll, Category.CHANCE)
    assert score == expected_score