diff --git a/tests/envs/mujoco/test_mujoco_custom_env.py b/tests/envs/mujoco/test_mujoco_custom_env.py index b0cfd1bbb..1cd4316b0 100644 --- a/tests/envs/mujoco/test_mujoco_custom_env.py +++ b/tests/envs/mujoco/test_mujoco_custom_env.py @@ -111,12 +111,14 @@ def test_frame_skip(frame_skip): def test_xml_file(): """Verify that the loading of a custom XML file works""" relative_path = "./tests/envs/mujoco/assets/walker2d_v5_uneven_feet.xml" - env = PointEnv(xml_file=relative_path) - assert env.unwrapped.data.qpos.size == 9 + env = PointEnv(xml_file=relative_path).unwrapped + assert isinstance(env, MujocoEnv) + assert env.data.qpos.size == 9 full_path = os.getcwd() + "/tests/envs/mujoco/assets/walker2d_v5_uneven_feet.xml" - env = PointEnv(xml_file=full_path) - assert env.unwrapped.data.qpos.size == 9 + env = PointEnv(xml_file=full_path).unwrapped + assert isinstance(env, MujocoEnv) + assert env.data.qpos.size == 9 # note can not test user home path (with '~') because github CI does not have a home folder