mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-26 08:17:18 +00:00
Remove pytest.importorskip (#2976)
This commit is contained in:
@@ -10,10 +10,7 @@ except ImportError:
|
||||
lz4 = None
|
||||
|
||||
|
||||
pytest.importorskip("gym.envs.atari")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("env_id", ["CartPole-v1", "Pendulum-v1", "Pong-v0"])
|
||||
@pytest.mark.parametrize("env_id", ["CartPole-v1", "Pendulum-v1", "CarRacing-v2"])
|
||||
@pytest.mark.parametrize("num_stack", [2, 3, 4])
|
||||
@pytest.mark.parametrize(
|
||||
"lz4_compress",
|
||||
@@ -42,8 +39,13 @@ def test_frame_stack(env_id, num_stack, lz4_compress):
|
||||
|
||||
for _ in range(num_stack**2):
|
||||
action = env.action_space.sample()
|
||||
dup_obs, _, _, _ = dup.step(action)
|
||||
obs, _, _, _ = env.step(action)
|
||||
dup_obs, _, dup_done, _ = dup.step(action)
|
||||
obs, _, done, _ = env.step(action)
|
||||
|
||||
assert dup_done == done
|
||||
assert np.allclose(obs[-1], dup_obs)
|
||||
|
||||
if done:
|
||||
break
|
||||
|
||||
assert len(obs) == num_stack
|
||||
|
Reference in New Issue
Block a user