def test_does_not_modify_action(self): inner_env = PointEnv(goal=(1., 2.)) env = NormalizedEnv(inner_env, scale_reward=10.) a = env.action_space.high + 1. a_copy = a env.reset() env.step(a) assert np.array_equal(a, a_copy) env.close()
def test_visualization(self): inner_env = PointEnv(goal=(1., 2.)) env = NormalizedEnv(inner_env) env.visualize() env.reset() assert inner_env.render_modes == env.render_modes mode = inner_env.render_modes[0] assert inner_env.render(mode) == env.render(mode)
def test_no_flatten_obs(self): inner_env = PointEnv(goal=(1., 2.)) env = NormalizedEnv(inner_env, flatten_obs=False) obs = env.reset()[0] assert obs.shape == env.observation_space.shape