def test_repeat_roller(): """Plays 1 round game and confirms proper exit IMPORTANT: pass 1 for num_rounds """ diffs = diff(Game(num_rounds=1).play, path="tests/version_4/complete.sim.txt") assert not diffs, diffs
def test_cheat_and_fix(): """Cheating (or typos) should not be allowed. Therefore the user's input must be validated If invalid prompt user for re-entry """ diffs = diff(Game().play, path="tests/version_3/cheat_and_fix.sim.txt") assert not diffs, diffs
def test_zilcher(): """ No scoring dice results in a 'zilch' which wipes away shelved points and ends turn """ diffs = diff(Game().play, path="tests/version_3/zilcher.sim.txt") assert not diffs, diffs
def test_quitter(): game = Game() diffs = diff(game.play, path="tests/flow/quitter.txt") assert not diffs, diffs
def test_bank_first_for_two_rounds(): game = Game() diffs = diff(game.play, path="tests/flow/bank_first_for_two_rounds.txt") assert not diffs, diffs
def test_single_bank(): game = Game() diffs = diff(game.play, path="tests/flow/bank_one_roll_then_quit.txt") assert not diffs, diffs
def test_one_and_done(): game = Game() diffs = diff(game.play, path="tests/flow/one_and_done.sim.txt") assert not diffs, diffs
def test_repeat_roller(): """Allow setting aside scoring dice and rolling the rest """ diffs = diff(Game().play, path="tests/version_3/repeat_roller.sim.txt") assert not diffs, diffs
def test_hot_dice(): """When all dice are used without a zilch then user gets 6 fresh dice and continues turn. """ diffs = diff(Game().play, path="tests/version_3/hot_dice.sim.txt") assert not diffs, diffs
def test_quitter(): game = Game() errors = diff(game.play, path="tests/version_2/quitter.sim.txt") assert not errors, errors[0]
def test_bank_first_for_two_rounds(): game = Game() errors = diff(game.play, path="tests/version_2/bank_first_for_two_rounds.sim.txt") assert not errors, errors[0]
def test_single_bank(): game = Game() errors = diff(game.play, path="tests/version_2/bank_one_roll_then_quit.sim.txt") assert not errors, errors[0]
def test_one_and_done(): game = Game() errors = diff(game.play, path="tests/version_2/one_and_done.sim.txt") assert not errors, errors[0]
def test_quitter(): game = Game() diffs = diff(game.play, path="tests/version_2/quitter.sim.txt") assert not diffs, diffs