Skip to content

Commit

Permalink
update test_envs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wjxgeorge committed Dec 14, 2024
1 parent 83b4a5f commit fba3892
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/test_envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,8 @@ def test_robot_env_reset(spec):
def _test_initial_states(env, seed=None):
diag_dict = {}

init_obs = env.reset(seed=seed)
env.reset(seed=seed)

if isinstance(init_obs[0], dict):
diag_dict.update(**init_obs[0])
elif isinstance(init_obs[0], np.ndarray):
diag_dict.update({"observation": init_obs[0]})
diag_dict.update(
{
"qpos": env.unwrapped.data.qpos,
Expand Down Expand Up @@ -227,4 +223,3 @@ def _test_initial_states(env, seed=None):

_test_initial_states(cur_env, seed=24)
_test_initial_states(cur_env, seed=10)
return

0 comments on commit fba3892

Please sign in to comment.