Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Former-commit-id: e630c32
  • Loading branch information
daochenzha committed May 5, 2021
1 parent 42e494c commit 516fb70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion tests/envs/test_uno_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TestUnoEnv(unittest.TestCase):
def test_reset_and_extract_state(self):
env = rlcard.make('uno')
state, _ = env.reset()
self.assertEqual(state['obs'].size, 420)
self.assertEqual(state['obs'].size, 240)

def test_is_deterministic(self):
self.assertTrue(is_deterministic('uno'))
Expand Down
4 changes: 0 additions & 4 deletions tests/games/test_uno_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ def test_get_action_num(self):
def test_init_game(self):
game = Game()
state, _ = game.init_game()
total_cards = list(state['hand'] + state['others_hand'])
self.assertGreaterEqual(len(total_cards), 14)

def test_get_player_id(self):
game = Game()
Expand Down Expand Up @@ -54,8 +52,6 @@ def test_get_payoffs(self):
actions = game.get_legal_actions()
action = np.random.choice(actions)
state, _ = game.step(action)
total_cards = len(state['hand']) + len(state['others_hand']) + len(state['played_cards']) + len(game.round.dealer.deck)
self.assertEqual(total_cards, 108)
payoffs = game.get_payoffs()
total = 0
for payoff in payoffs:
Expand Down

0 comments on commit 516fb70

Please sign in to comment.