コード例 #1
0
ファイル: test-PokerGame.py プロジェクト: von/pyPoker
 def test_Simulator(self):
     """Test basic Simulator construction"""
     simulator = Simulator()
     self.assertIsNotNone(simulator)
     self.assertEqual(simulator.GAME_NAME, "Poker")
     simulator = Simulator(number_of_hands=10)
     self.assertIsNotNone(simulator)
     deck = Deck()
     hands = deck.createHands(9)
     simulator = Simulator(predefined_hands=hands)
     self.assertIsNotNone(simulator)
     self.assertEqual(hands, simulator.get_predefined_hands())
コード例 #2
0
ファイル: test-PokerGame.py プロジェクト: von/pyPoker
 def test_simulate_games(self):
     """Test Simulator.simulate_games()"""
     simulator = Simulator()
     stats = simulator.simulate_games()
     self.assertIsNotNone(stats)
     self.assertIsInstance(stats, Stats)
コード例 #3
0
ファイル: test-PokerGame.py プロジェクト: von/pyPoker
 def test_simulate_game(self):
     """Test Simulator.simulate_game()"""
     simulator = Simulator()
     result = simulator.simulate_game()
     self.assertIsNotNone(result)
     self.assertIsInstance(result, Result)