Пример #1
0
 def test_Structure_no_limit(self):
     """Test a Limit Structure class"""
     ante = 5
     blinds = [10]
     structure = Structure(Structure.LIMIT, ante=ante, blinds=blinds)
     self.assertIsNotNone(structure)
     self.assertTrue(structure.is_limit())
     self.assertEqual(structure.get_ante(), ante)
     self.assertListEqual(structure.get_blinds(), blinds)
     # minimum bet should be big blind for all rounds
     betting_round = 1
     self.assertEqual(structure.get_minimum_bet(betting_round=betting_round),
                      max(blinds))
Пример #2
0
 def test_Structure_limit(self):
     """Test a Limit Structure class"""
     ante = 10
     blinds = [50,100]
     min_bets = [100,100,200,200]
     structure = Structure(Structure.LIMIT, ante=ante,
                           blinds=blinds, bet_sizes=min_bets)
     self.assertIsNotNone(structure)
     self.assertTrue(structure.is_limit())
     self.assertFalse(structure.is_pot_limit())
     self.assertFalse(structure.is_no_limit())
     self.assertEqual(structure.get_ante(), ante)
     self.assertListEqual(structure.get_blinds(), blinds)
     betting_round = 1
     self.assertEqual(
         structure.get_minimum_bet(betting_round=betting_round),
         min_bets[betting_round-1])