Skip to content

Commit

Permalink
fix pyright.TypeIssues in test_mujoco_custom_env.py (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kallinteris-Andreas authored Jul 10, 2023
1 parent 1d305e1 commit ee067c7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/envs/mujoco/test_mujoco_custom_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ee067c7

Please sign in to comment.