Skip to content

Commit

Permalink
fix ups
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-s-s committed Nov 30, 2020
1 parent be48d02 commit 698c553
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/the_dice.rst
Expand Up @@ -265,7 +265,7 @@ This says that, with 3*Die(3), the roll: (1, 1, 1) happens once. The roll: (1,
:code: `BestOfDicePool(DicePool(Die(3), 3), 2)` looks at the above dictionary and selects the two best
rolls in each tuple. so:

>>> best_two = dt.BestOfDicePool(pool)
>>> best_two = dt.BestOfDicePool(pool, 2)
>>> best_two.get_dict() == {2: 1, 3: 3, 4: 7, 5: 9, 6: 7}
True

Expand Down
6 changes: 6 additions & 0 deletions tests/test_dicepool.py
Expand Up @@ -55,6 +55,12 @@ def test_dice_pool_equality_false_by_size():
assert DicePool(die, size) != DicePool(die, size - 1)


def test_dice_pool_equality_false_by_type():
pool = DicePool(Die(2), 3)
assert pool != 3
assert 3 != pool


@pytest.mark.parametrize("die_size", [3, 4, 6])
@pytest.mark.parametrize("pool_size", [2, 4, 5])
def test_dice_pool_is_hashable(die_size, pool_size):
Expand Down

0 comments on commit 698c553

Please sign in to comment.