def test_wild(self): amount, sides = 6, 6 assert len(WildRoll.roll(amount, 1, sides)) >= amount rr = WildRoll.roll(amount, 1, sides) assert 0 <= sum(rr) assert WildRoll.roll(0, 1, sides) == [] assert WildRoll.roll(1, 1, 1) == [1]
def test_wild_critfail(self): while True: if WildRoll.roll(3, 1, 2) == [0, 0, 0]: break
def test_wild_fail(self): while True: if WildRoll.roll(1, 1, 2) == [0]: break
def test_wild_success(self): while True: if len(WildRoll.roll(1, 1, 2)) > 1: break