コード例 #1
0
def test_chance():
    '''
    Chance
    The player scores the sum of all dice, no matter what they read.
    '''
    # iterar sobre *args evita codigo cableado a 5 argumentos
    assert 15 == Yatzy.chance(1, 2, 3, 4, 5)
    assert 14 == Yatzy.chance(1, 1, 3, 3, 6)
    assert 21 == Yatzy.chance(4, 5, 5, 6, 1)
コード例 #2
0
ファイル: test_yatzy.py プロジェクト: sewerai-org/yatzy-kata
def test_chance_scores_sum_of_all_dice():
    expected = 15
    actual = Yatzy.chance(2, 3, 4, 5, 1)
    assert expected == actual
    assert 16 == Yatzy.chance(3, 3, 4, 5, 1)
コード例 #3
0
def test_chance_scores_sum_of_all_dice():
    assert Yatzy.chance(2, 3, 4, 5, 1) == 15
    assert Yatzy.chance(3, 3, 4, 5, 1) == 16
コード例 #4
0
def test_chance():
    # iterar sobre *args evita codigo cableado a 5 argumentos
    assert 15 == Yatzy.chance(1, 2, 3, 4, 5)
    assert 14 == Yatzy.chance(1, 1, 3, 3, 6)
    assert 21 == Yatzy.chance(4, 5, 5, 6, 1)
コード例 #5
0
def test_chance_scores_sum_of_all_dice():
    assert 15 == Yatzy.chance(2, 3, 4, 5, 1)
    assert 16 == Yatzy.chance(3, 3, 4, 5, 1)
コード例 #6
0
def test_chance_scores_sum_of_all_dice():
        expected = 16
        actual = Yatzy.chance([3,1,4,5,3])
        assert expected == actual
        assert 9 == Yatzy.chance([1,3,1,2,2])
        assert 10 == Yatzy.chance([2,1,4,2,1])
コード例 #7
0
ファイル: test_yatzy.py プロジェクト: daniarques11/Yatzy
def test_chance():
    assert 15 == Yatzy.chance(2, 3, 4, 5, 1)
    assert 16 == Yatzy.chance(3, 3, 4, 5, 1)
    assert 14 == Yatzy.chance(1, 1, 3, 3, 6)
    assert 21 == Yatzy.chance(4, 5, 5, 6, 1)
コード例 #8
0
def test_chance():  #el resultado de chance es la suma de todos los dados
    assert Yatzy.chance(1, 1, 1, 1, 1) == 5
    assert Yatzy.chance(2, 3, 4, 5, 1) == 15
    assert Yatzy.chance(3, 3, 4, 5, 1) == 16
コード例 #9
0
def test_chance():
    assert 15 == Yatzy.chance(5, 3, 2, 1, 4)
    assert 27 == Yatzy.chance(5, 5, 5, 6, 6)
    assert 6 == Yatzy.chance(1, 1, 1, 1, 2)
コード例 #10
0
ファイル: test_yatzy.py プロジェクト: gboned/Refactorizar
def test_chance():
    assert Yatzy.chance(2, 3, 4, 5, 1) == 15
    assert Yatzy.chance(3, 3, 4, 5, 1) == 16
コード例 #11
0
def test_chance():
    ### La suma de todos los dados ###
    assert 15 == Yatzy.chance(1, 2, 3, 4, 5)
    assert 14 == Yatzy.chance(1, 1, 3, 3, 6)
    assert 21 == Yatzy.chance(4, 5, 5, 6, 1)
コード例 #12
0
def test_chance_scores_sum_of_all_dice():
    expected = 15
    actual = Yatzy.chance(2, 3, 4, 5, 1)
    assert expected == actual
    assert 16 == Yatzy.chance(3, 3, 4, 5, 1)
コード例 #13
0
def test_chance():
    # iterar sobre *args evita codigo cableado a 5 argumentos
    assert 15 == Yatzy.chance(1, 2, 3, 4, 5)
    assert 14 == Yatzy.chance(1, 1, 3, 3, 6)
    assert 21 == Yatzy.chance(4, 5, 5, 6, 1)