Exemplo n.º 1
0
 def test_1d20(self):
     self.assertEqual(utils.parse_dstr("1d20"), (1, 20))
Exemplo n.º 2
0
 def test_3d6(self):
     self.assertEqual(utils.parse_dstr("3d6"), (3, 6))
Exemplo n.º 3
0
 def test_bad_str(self):
     with self.assertRaises(IndexError):
         utils.parse_dstr("123")
Exemplo n.º 4
0
 def test_partial_str(self):
     with self.assertRaises(ValueError):
         utils.parse_dstr("2d")
Exemplo n.º 5
0
 def test_4d8(self):
     self.assertEqual(utils.parse_dstr("4d8"), (4, 8))