예제 #1
0
def display(s, amount=20):
    # Show a sample distribution
    v = []
    args = EmulatedArg(s)
    for n in range(amount):
        v.append(main(args))

    graph(v, s)
    return v
    def test_main_user_wins(self, mock_print, mock_roll):

        dice.main()
        # assert print called with 'you win!'
        mock_print.assert_any_call('you win!')
예제 #3
0
 def test_main_user_loses(self, mock_print, mock_roll):
     dice.main()
     ## assert any print called you lose
     mock_print.assert_any_call('you Lose!')
예제 #4
0
def testLow(s):
    a = EmulatedArg(s, lo=True)
    return main(a)
예제 #5
0
def testHigh(s):
    a = EmulatedArg(s, hi=True)
    return main(a)
def attempt_one():
    return str(dice.main(6, 12))