Adds testing to check_env that closing a closed environment doesn't raise an error (#564)

Co-authored-by: Quentin GALLOUÉDEC <gallouedec.quentin@gmail.com>
Co-authored-by: Quentin Gallouédec <45557362+qgallouedec@users.noreply.github.com>
This commit is contained in:
Mark Towers
2023-06-21 17:39:50 +01:00
committed by GitHub
parent ee2918f799
commit a40234f5ef
5 changed files with 32 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ class GenericTestEnv(gym.Env):
metadata: dict[str, Any] = {"render_modes": []},
render_mode: str | None = None,
spec: EnvSpec = EnvSpec(
"TestingEnv-v0", "testing-env-no-entry-point", max_episode_steps=100
"TestingEnv-v0", "tests.testing_env:GenericTestEnv", max_episode_steps=100
),
):
"""Generic testing environment constructor.