示例#1
0
def test_weighted_dice_set_add_11():
    wds1 = WeightedDiceSet(4, 3, weights=[1, 3, 2])
    ds2 = DiceSet(3, 4, base=2)
    with pytest.raises(TypeError):
        wds3 = ds2 + wds1
示例#2
0
def test_weighted_dice_set_add_12():
    wds1 = WeightedDiceSet(4, 3, weights=[1, 3, 2])
    with pytest.raises(TypeError):
        wds3 = 4 + wds1
示例#3
0
def test_weighted_dice_set_add_8():
    wds1 = WeightedDiceSet(4, 3, weights=[1, 3, 2])
    ds2 = DiceSet(3, 3)
    wds3 = ds2 + wds1
    assert wds3.number == 7
示例#4
0
def test_weighted_dice_set_add_9():
    wds1 = WeightedDiceSet(4, 3, weights=[1, 3, 2])
    ds2 = DiceSet(3, 3)
    wds3 = ds2 + wds1
    assert wds3.weights == [2, 4, 3]
示例#5
0
def test_weighted_dice_set_add_6():
    wds1 = WeightedDiceSet(4, 3, weights=[1, 3, 2])
    wds2 = WeightedDiceSet(2, 2, weights=[3, 3, 1])
    with pytest.raises(TypeError):
        wds3 = wds1 + wds2
示例#6
0
def test_weighted_dice_set_add_2():
    wds1 = WeightedDiceSet(4, 3, weights=[1, 3, 2])
    wds2 = WeightedDiceSet(2, 3, weights=[3, 3, 1])
    wds3 = wds1 + wds2
    assert wds3.weights == [4, 6, 3]
示例#7
0
def test_weighted_dice_set_add_1():
    wds1 = WeightedDiceSet(4, 3, weights=[1, 3, 2])
    wds2 = WeightedDiceSet(2, 3, weights=[3, 3, 1])
    wds3 = wds1 + wds2
    assert wds3.number == 6
示例#8
0
def test_weighted_dice_set_init_2():
    wds = WeightedDiceSet(4, 3, weights=[1, 3, 2])
    assert wds.weights == [1, 3, 2]
示例#9
0
def test_weighted_dice_set_init_1():
    wds = WeightedDiceSet(4, 3)
    assert wds.weights == [1, 1, 1]