Skip to content

Commit

Permalink
Update the check_env test for all environments
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts committed Mar 2, 2024
1 parent 14a8711 commit a1a26c9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/python/test_atari_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
"env_id",
[
env_id
for env_id in gymnasium.registry.keys()
if (env_id.startswith("ALE/") and (env_id.endswith("-v5")))
for env_id, spec in gymnasium.registry.items()
if spec.entry_point == "ale_py.env:AtariEnv"
],
)
def test_check_env(env_id):
check_env(gymnasium.make(env_id))
with warnings.catch_warnings(record=True) as caught_warnings:
env = gymnasium.make(env_id).unwrapped
check_env(env)

env.close()

assert len(caught_warnings) == 0


def test_register_legacy_env_id():
Expand Down

0 comments on commit a1a26c9

Please sign in to comment.