From 5f939899e3f7f6b5a31330a56b600a2914f6e32e Mon Sep 17 00:00:00 2001 From: Reggie McLean Date: Mon, 22 Apr 2024 20:02:31 -0400 Subject: [PATCH] making tests more restrictive --- .../envs/mujoco/sawyer_xyz/test_sawyer_xyz_env.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/metaworld/envs/mujoco/sawyer_xyz/test_sawyer_xyz_env.py b/tests/metaworld/envs/mujoco/sawyer_xyz/test_sawyer_xyz_env.py index c4610256b..361e743e6 100644 --- a/tests/metaworld/envs/mujoco/sawyer_xyz/test_sawyer_xyz_env.py +++ b/tests/metaworld/envs/mujoco/sawyer_xyz/test_sawyer_xyz_env.py @@ -31,15 +31,11 @@ def test_reset_returns_same_obj_and_goal(): # Display initial object positions and find environments with non-unique positions. violating_envs_obs = [] for env_name, task_initial_pos in initial_obj_poses.items(): - if len(np.unique(np.array(task_initial_pos), axis=0)) > 1 and not np.allclose( - task_initial_pos[0], task_initial_pos[1], rtol=1e-1, atol=1e-1 - ): + if len(np.unique(np.array(task_initial_pos), axis=0)) > 1: violating_envs_obs.append(env_name) violating_envs_goals = [] for env_name, target_pos in goal_poses.items(): - if len(np.unique(np.array(target_pos), axis=0)) > 1 and not np.allclose( - target_pos[0], target_pos[1], rtol=1e-2, atol=1e-3 - ): + if len(np.unique(np.array(target_pos), axis=0)) > 1: violating_envs_goals.append(env_name) assert not violating_envs_obs assert not violating_envs_goals