Skip to content

Commit

Permalink
106-dev fix pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ Holmes committed Mar 26, 2024
1 parent 0d8bab2 commit d97d482
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,15 @@ def test_roll_dice(self):
self.assertGreater(len(the_rolls[20]), 0)

def test_roll_dice_exc(self):
with self.assertRaises(roller.RollError):
roller.roll_dice({20:"nope!"})

"""Test attempts to roll dice with a bad dice count."""
dataset = [
{20:"nope!"},
{"8":1},
{8:12, "umbridge":"sucks"},
]
for dcount in dataset:
with self.subTest(dice_count=dcount), self.assertRaises(roller.RollError):
roller.roll_dice(dcount)

if __name__ == "__main__":
unittest.main()

0 comments on commit d97d482

Please sign in to comment.