Skip to content

Commit

Permalink
making tests more restrictive
Browse files Browse the repository at this point in the history
  • Loading branch information
reginald-mclean committed Apr 23, 2024
1 parent 3f172d1 commit 5f93989
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/metaworld/envs/mujoco/sawyer_xyz/test_sawyer_xyz_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5f93989

Please sign in to comment.