示例#1
0
    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]
示例#2
0
    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]
示例#3
0
 def test_wild_critfail(self):
     while True:
         if WildRoll.roll(3, 1, 2) == [0, 0, 0]:
             break
示例#4
0
 def test_wild_fail(self):
     while True:
         if WildRoll.roll(1, 1, 2) == [0]:
             break
示例#5
0
 def test_wild_success(self):
     while True:
         if len(WildRoll.roll(1, 1, 2)) > 1:
             break
示例#6
0
 def test_wild_critfail(self):
     while True:
         if WildRoll.roll(3, 1, 2) == [0, 0, 0]:
             break
示例#7
0
 def test_wild_fail(self):
     while True:
         if WildRoll.roll(1, 1, 2) == [0]:
             break
示例#8
0
 def test_wild_success(self):
     while True:
         if len(WildRoll.roll(1, 1, 2)) > 1:
             break