Skip to content

Commit

Permalink
fix test for leduc
Browse files Browse the repository at this point in the history
Former-commit-id: 955039b
  • Loading branch information
ruzhwei committed Apr 7, 2020
1 parent 3902ab4 commit 416b37c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/envs/test_leducholdem_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TestLeducholdemEnv(unittest.TestCase):
def test_init_game_and_extract_state(self):
env = rlcard.make('leduc-holdem')
state, _ = env.init_game()
self.assertEqual(state['obs'].size, 34)
self.assertEqual(state['obs'].size, 49)
for action in state['legal_actions']:
self.assertLess(action, env.action_num)

Expand Down
6 changes: 3 additions & 3 deletions tests/games/test_leducholdem_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_init_game(self):
self.assertEqual(test_id, player_id)
self.assertIn('raise', state['legal_actions'])
self.assertIn('fold', state['legal_actions'])
self.assertIn('check', state['legal_actions'])
self.assertIn('call', state['legal_actions'])

def test_step(self):
game = Game()
Expand All @@ -45,7 +45,7 @@ def test_step(self):

# test check
game.init_game()
game.step('check')
game.step('call')
game.step('check')
self.assertEqual(game.round_counter, 1)

Expand Down Expand Up @@ -95,7 +95,7 @@ def test_player_get_player_id(self):
def test_is_over(self):
game = Game()
game.init_game()
game.step('check')
game.step('call')
game.step('check')
game.step('check')
game.step('check')
Expand Down

0 comments on commit 416b37c

Please sign in to comment.