mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-28 17:27:08 +00:00
fix pyright.TypeIssues
in test_mujoco_custom_env.py
(#599)
This commit is contained in:
committed by
GitHub
parent
1d305e1214
commit
ee067c721b
@@ -111,12 +111,14 @@ def test_frame_skip(frame_skip):
|
|||||||
def test_xml_file():
|
def test_xml_file():
|
||||||
"""Verify that the loading of a custom XML file works"""
|
"""Verify that the loading of a custom XML file works"""
|
||||||
relative_path = "./tests/envs/mujoco/assets/walker2d_v5_uneven_feet.xml"
|
relative_path = "./tests/envs/mujoco/assets/walker2d_v5_uneven_feet.xml"
|
||||||
env = PointEnv(xml_file=relative_path)
|
env = PointEnv(xml_file=relative_path).unwrapped
|
||||||
assert env.unwrapped.data.qpos.size == 9
|
assert isinstance(env, MujocoEnv)
|
||||||
|
assert env.data.qpos.size == 9
|
||||||
|
|
||||||
full_path = os.getcwd() + "/tests/envs/mujoco/assets/walker2d_v5_uneven_feet.xml"
|
full_path = os.getcwd() + "/tests/envs/mujoco/assets/walker2d_v5_uneven_feet.xml"
|
||||||
env = PointEnv(xml_file=full_path)
|
env = PointEnv(xml_file=full_path).unwrapped
|
||||||
assert env.unwrapped.data.qpos.size == 9
|
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
|
# note can not test user home path (with '~') because github CI does not have a home folder
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user