Skip to content

Commit

Permalink
Test: Revert ActStr
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Weiss <[email protected]>
  • Loading branch information
DEUCE1957 committed Nov 11, 2024
1 parent f72adae commit 6e3e140
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions grid2op/tests/test_alert_gym_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,36 +117,36 @@ def test_print_alert(self):
act.raise_alert = [2]
act_gym = env_gym.action_space.to_gym(act)
act_str = act_gym.__str__()
assert act_str == ("OrderedDict({'change_bus': array([False, False, False, False, False, False, False, False, False,\n "
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, "
"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, 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, 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, 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, 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, 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])), ('change_line_status', 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, 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, False, False, False, False, False, False,\n "
"False, False, False, False, False, False]), 'change_line_status': 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, 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, False, False]), "
"'curtail': array([-1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1., -1.,\n -1., -1., -1., -1., "
"-1., -1., -1., -1., -1.], dtype=float32), 'raise_alert': array([False, False, True, False, False, False, False, "
"False, False,\n False]), 'redispatch': array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., "
"0., 0.,\n 0., 0., 0., 0., 0.], dtype=float32), 'set_bus': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "
"0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, "
"0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "
"0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n "
"0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "
"0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n "
"0], dtype=int32), 'set_line_status': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n "
"0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "
"dtype=int32)})")
"False, False, False, False,\n False, False, False, False, False])), ('curtail', array([-1., -1., -1., "
"-1., -1., -1., -1., -1., -1., -1., -1., -1., -1.,\n -1., -1., -1., -1., -1., -1., -1., -1., -1.], "
"dtype=float32)), ('raise_alert', array([False, False, True, False, False, False, False, False, False,\n "
"False])), ('redispatch', array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n "
"0., 0., 0., 0., 0.], dtype=float32)), ('set_bus', array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "
"0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, "
"0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "
"0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, "
"0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "
"0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0], dtype=int32)), "
"('set_line_status', array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, "
"0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=int32))])")

def test_convert_alert_to_gym(self):
"""test i can create the env"""
Expand Down

0 comments on commit 6e3e140

Please sign in to comment.