Skip to content

Commit

Permalink
try to fix issue with storage units
Browse files Browse the repository at this point in the history
Signed-off-by: DONNOT Benjamin <[email protected]>
  • Loading branch information
BDonnot committed Dec 16, 2024
1 parent 3d9794a commit 1990c36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightsim2grid/tests/test_issue_66.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ def test_disco_storage(self):
obs = self.env.reset()
act = self.env.action_space({"set_bus": {"storages_id": [(0, -1)]}})
obs, reward, done, info = self.env.step(act)
assert len(info['exception']) == 0
assert len(info['exception']) == 0, f"{len(info['exception'])} vs 0"
assert not done
# should not raise any RuntimeError

act = self.env.action_space({"set_storage": [(0, -1)]})
obs, reward, done, info = self.env.step(act)
# grid2op >= 1.11.0 requires this
assert len(info['exception']) == 1
assert len(info['exception']) == 1, f"{len(info['exception'])} vs 1"
assert done
# should not raise any RuntimeError

Expand Down

0 comments on commit 1990c36

Please sign in to comment.