Ejemplo n.º 1
0
 def test_does_not_modify_action(self):
     env = PointEnv()
     a = env.action_space.sample()
     a_copy = a.copy()
     env.reset()
     env.step(a)
     assert a.all() == a_copy.all()
     env.close()
    def test_reset(self):
        env = PointEnv()

        assert (env._point == np.array([0, 0])).all()

        a = env.action_space.sample()
        _ = env.step(a)
        env.reset()

        assert (env._point == np.array([0, 0])).all()