示例#1
0
  def test_play(self, foo):
    g = Game(pot=100.0, capital=1000.0, rounds=10)
 
    with patch('shuffle.round.Round.run') as run:
      g.play()
      
      self.assertEqual(run.call_count, 20)
示例#2
0
 def test_get_player_list(self):
   g = Game(pot=100.0, capital=1000.0, rounds=10)
   players = g._get_player_list()
   
   # make sure we have players
   self.assertTrue(len(players) > 0)
   
   # make sure their capital was set correctly
   self.assertEqual(players[0].capital, 1000.0)