From a09726c36408b24e6771da0dc77331d6eafc62a4 Mon Sep 17 00:00:00 2001 From: Roman Vaxenburg Date: Wed, 6 Mar 2024 14:35:06 -0500 Subject: [PATCH] Update test. --- tests/test_core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_core.py b/tests/test_core.py index c912a11..f73a7a9 100755 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,5 +1,6 @@ """Test core installation by creating an RL environment and stepping it.""" +import os import numpy as np from flybody.fly_envs import walk_on_ball @@ -18,6 +19,7 @@ obs_names = ['walker/' + s for s in obs_names] + def test_can_create_and_run_environment(): env = walk_on_ball() @@ -38,3 +40,6 @@ def test_can_create_and_run_environment(): timestep = env.step(action) assert timestep.reward is not None + # For local testing only. + if os.environ['MUJOCO_GL'] == 'egl': + _ = env.physics.render()