Add env.close()

This commit is contained in:
Simon Alibert 2024-04-09 10:41:20 +02:00
parent dfaacbcf5a
commit d21543eb4f
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,7 @@ def test_env(env_name, task, obs_type):
importlib.import_module(package_name) importlib.import_module(package_name)
env = gym.make(f"{package_name}/{task}", obs_type=obs_type) env = gym.make(f"{package_name}/{task}", obs_type=obs_type)
check_env(env.unwrapped) check_env(env.unwrapped)
env.close()
@pytest.mark.parametrize( @pytest.mark.parametrize(
"env_name", "env_name",
@ -61,3 +61,5 @@ def test_factory(env_name):
# TODO(rcadene): we assume for now that image normalization takes place in the model # TODO(rcadene): we assume for now that image normalization takes place in the model
assert img.max() <= 1.0 assert img.max() <= 1.0
assert img.min() >= 0.0 assert img.min() >= 0.0
env.close()