From f1ec4d795df40531649f74a1c122743e6ed173e8 Mon Sep 17 00:00:00 2001 From: Kallinteris Andreas Date: Mon, 14 Oct 2024 03:11:54 +0300 Subject: [PATCH] fix remaining tests --- tests/envs/franka_kitchen/test_kitchen_env.py | 3 +++ tests/envs/hand/test_manipulate.py | 3 +++ tests/envs/hand/test_manipulate_touch_sensors.py | 4 ++++ tests/envs/hand/test_reach.py | 4 ++++ tests/envs/maze/test_ant_maze.py | 4 ++++ tests/envs/maze/test_point_maze.py | 4 ++++ 6 files changed, 22 insertions(+) diff --git a/tests/envs/franka_kitchen/test_kitchen_env.py b/tests/envs/franka_kitchen/test_kitchen_env.py index 4c3f92b4..c3ce6ada 100644 --- a/tests/envs/franka_kitchen/test_kitchen_env.py +++ b/tests/envs/franka_kitchen/test_kitchen_env.py @@ -3,11 +3,14 @@ import gymnasium as gym import pytest +import gymnasium_robotics from gymnasium_robotics.envs.franka_kitchen.kitchen_env import ( OBS_ELEMENT_GOALS, OBS_ELEMENT_INDICES, ) +gym.register_envs(gymnasium_robotics) + TASKS = ["microwave", "kettle"] diff --git a/tests/envs/hand/test_manipulate.py b/tests/envs/hand/test_manipulate.py index 987093bd..8a456cfc 100644 --- a/tests/envs/hand/test_manipulate.py +++ b/tests/envs/hand/test_manipulate.py @@ -3,6 +3,9 @@ import gymnasium as gym import pytest +import gymnasium_robotics + +gym.register_envs(gymnasium_robotics) ENVIRONMENT_IDS = ( # "HandManipulateEgg-v0", # "HandManipulatePen-v0", diff --git a/tests/envs/hand/test_manipulate_touch_sensors.py b/tests/envs/hand/test_manipulate_touch_sensors.py index f741e3f4..e2c4e199 100644 --- a/tests/envs/hand/test_manipulate_touch_sensors.py +++ b/tests/envs/hand/test_manipulate_touch_sensors.py @@ -3,6 +3,10 @@ import gymnasium as gym import pytest +import gymnasium_robotics + +gym.register_envs(gymnasium_robotics) + ENVIRONMENT_IDS = ( "HandManipulateEgg_ContinuousTouchSensors-v1", "HandManipulatePen_BooleanTouchSensors-v1", diff --git a/tests/envs/hand/test_reach.py b/tests/envs/hand/test_reach.py index b4702558..1b91afd9 100644 --- a/tests/envs/hand/test_reach.py +++ b/tests/envs/hand/test_reach.py @@ -2,6 +2,10 @@ import gymnasium as gym +import gymnasium_robotics + +gym.register_envs(gymnasium_robotics) + def test_serialize_deserialize(): env1 = gym.make("HandReach-v2", distance_threshold=1e-6) diff --git a/tests/envs/maze/test_ant_maze.py b/tests/envs/maze/test_ant_maze.py index dfadd10d..b4a13f87 100644 --- a/tests/envs/maze/test_ant_maze.py +++ b/tests/envs/maze/test_ant_maze.py @@ -2,6 +2,10 @@ import numpy as np import pytest +import gymnasium_robotics + +gym.register_envs(gymnasium_robotics) + @pytest.mark.parametrize("version", ["v4", "v5"]) def test_reset(version): diff --git a/tests/envs/maze/test_point_maze.py b/tests/envs/maze/test_point_maze.py index e2204891..725bec5c 100644 --- a/tests/envs/maze/test_point_maze.py +++ b/tests/envs/maze/test_point_maze.py @@ -1,6 +1,10 @@ import gymnasium as gym import numpy as np +import gymnasium_robotics + +gym.register_envs(gymnasium_robotics) + def test_reset(): """Check that PointMaze does not reset into a success state."""