mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-09-03 19:03:10 +00:00
* Remove registration of Robotics envs * Remove Robotics environments * Update setup.py * Update unit tests * Remove unused GoalEnv class
23 lines
586 B
Python
23 lines
586 B
Python
import pickle
|
|
|
|
import pytest
|
|
|
|
from gym import envs
|
|
from tests.envs.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE
|
|
|
|
|
|
ENVIRONMENT_IDS = ("HalfCheetah-v2",)
|
|
|
|
|
|
@pytest.mark.skipif(skip_mujoco, reason=SKIP_MUJOCO_WARNING_MESSAGE)
|
|
@pytest.mark.parametrize("environment_id", ENVIRONMENT_IDS)
|
|
def test_serialize_deserialize(environment_id):
|
|
env = envs.make(environment_id)
|
|
env.reset()
|
|
|
|
with pytest.raises(ValueError, match="Action dimension mismatch"):
|
|
env.step([0.1])
|
|
|
|
with pytest.raises(ValueError, match="Action dimension mismatch"):
|
|
env.step(0.1)
|