Skip to content

Commit

Permalink
Test: Update ObsDim gym_compat
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Weiss <[email protected]>
  • Loading branch information
DEUCE1957 committed Nov 8, 2024
1 parent 7397069 commit bc02da6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion grid2op/tests/_aux_test_gym_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def test_convert_togym(self):
for el in env_gym.observation_space.spaces
]
)
size_th = 536 # as of grid2Op 1.7.1 (where all obs attributes are there)
size_th = 558 # as of grid2Op 1.7.1 (where all obs attributes are there)
# as of grid2op 1.11.0 (where flexibility was added)
assert (
dim_obs_space == size_th
), f"Size should be {size_th} but is {dim_obs_space}"
Expand Down
3 changes: 2 additions & 1 deletion grid2op/tests/test_alert_gym_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def test_print_alert(self):
act = self.env.action_space()
act.raise_alert = [2]
act_gym = env_gym.action_space.to_gym(act)
act_str = act_gym.__str__()
act_str = act_gym.__str__()
# NOTE: This Str Comparison may fail locally due to changes in OrderDict formatting (rely on CI if in doubt)
assert act_str == ("OrderedDict([('change_bus', array([False, False, False, False, False, False, False, False, False,"
"\n False, False, False, False, False, False, False, False, False,\n "
"False, False, False, False, False, False, False, False, False,\n False, False, False, "
Expand Down

0 comments on commit bc02da6

Please sign in to comment.