コード例 #1
0
 def test_get_type_of_dice_no_bonus(self):
     """get the type of dice with no bonus. The 12 in 3d12"""
     expect = 12
     result = RpgDataMangling.parse_dice("3d12")[1]
     self.assertEqual(expect, result)
コード例 #2
0
 def test_get_big_type_of_dice(self):
     """get the type of dice. The 20 in 22d20+31"""
     expect = 20
     result = RpgDataMangling.parse_dice("22d20+31")[1]
     self.assertEqual(expect, result)
コード例 #3
0
 def test_get_big_bonus_of_dice(self):
     """get the bonus applied to the dice roll. The 31 in 22d20+31"""
     expect = 31
     result = RpgDataMangling.parse_dice("22d20+31")[2]
     self.assertEqual(expect, result)
コード例 #4
0
 def test_get_bonus_of_dice(self):
     """get the bonus applied to the dice roll. The 3 in 2d6+3"""
     expect = 3
     result = RpgDataMangling.parse_dice("2d6+3")[2]
     self.assertEqual(expect, result)
コード例 #5
0
 def test_get_big_number_of_dice(self):
     """get the number of dice. The 22 in 22d20+31"""
     expect = 22
     result = RpgDataMangling.parse_dice("22d20+31")[0]
     self.assertEqual(expect, result)
コード例 #6
0
 def test_get_type_of_dice(self):
     """get the type of dice. The 6 in 2d6+3"""
     expect = 6
     result = RpgDataMangling.parse_dice("2d6+3")[1]
     self.assertEqual(expect, result)
コード例 #7
0
 def test_get_number_of_dice(self):
     """get the number of dice. The 2 in 2d6+3"""
     expect = 2
     result = RpgDataMangling.parse_dice("2d6+3")[0]
     self.assertEqual(expect, result)
コード例 #8
0
 def test_get_number_of_dice_no_bonus_upper(self):
     """handle D. get the number of dice with no bonus. The 4 in 4D8"""
     expect = 4
     result = RpgDataMangling.parse_dice("4D8")[0]
     self.assertEqual(expect, result)
コード例 #9
0
 def test_get_type_of_dice_no_bonus_upper(self):
     """handle D. get the type of dice with no bonus. The 8 in 4D8"""
     expect = 8
     result = RpgDataMangling.parse_dice("4D8")[1]
     self.assertEqual(expect, result)
コード例 #10
0
 def test_get_number_of_dice_no_bonus(self):
     """get the number of dice with no bonus. The 3 in 3d12"""
     expect = 3
     result = RpgDataMangling.parse_dice("3d12")[0]
     self.assertEqual(expect, result)