Skip to content

Commit

Permalink
Mujoco rendering tests close viewer after usage
Browse files Browse the repository at this point in the history
  • Loading branch information
guyazran committed Oct 5, 2023
1 parent f8ae8f4 commit 89db1c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/envs/mujoco/test_mujoco_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def test_offscreen_viewer_custom_dimensions(
img = viewer.render(render_mode="rgb_array")
assert img.shape == (height, width, 3)

# close viewer after usage
viewer.close()


@pytest.mark.parametrize("render_mode", ["human", "rgb_array", "depth_array"])
@pytest.mark.parametrize("max_geom", [10, 100, 1000, 10000])
Expand All @@ -75,3 +78,6 @@ def test_max_geom_attribute(

# assert that max_geom is set correctly in the viewer scene
assert viewer.scn.maxgeom == max_geom

# close viewer after usage
viewer.close()

0 comments on commit 89db1c3

Please sign in to comment.