コード例 #1
0
ファイル: test_pig.py プロジェクト: AlanCoding/curriculum
def test_turn_repeats_until_player_stops():
    # This should result in a rolls of [2, 4, 4].
    random.seed(100)

    player = StopAtThreePlayer()
    turn = Turn(player)
    turn.start()
    assert turn.over
    assert turn.player.rolls == [2, 4, 4]
コード例 #2
0
def test_turn_repeats_until_player_stops():
    # This should result in a rolls of [2, 4, 4].
    random.seed(100)

    player = StopAtThreePlayer()
    turn = Turn(player)
    turn.start()
    assert turn.over
    assert turn.player.rolls == [2, 4, 4]