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