def testEnvChecksActions(self):
    obs_spec = array_spec.BoundedArraySpec((2, 3), np.int32, (- 10), 10)
    action_spec = array_spec.BoundedArraySpec((2, 2), np.int32, (- 10), 10)
    env = random_py_environment.RandomPyEnvironment(obs_spec, action_spec=action_spec)
    env.step(np.array([[0, 0], [0, 0]]))
    with self.assertRaises(ValueError):
        env.step([0])
def testEnvChecksActions(self):
    obs_spec = array_spec.BoundedArraySpec((2, 3), np.int32, (- 10), 10)
    action_spec = array_spec.BoundedArraySpec((2, 2), np.int32, (- 10), 10)
    env = random_py_environment.RandomPyEnvironment(obs_spec, action_spec=action_spec)
    env.step(np.array([[0, 0], [0, 0]]))
    with self.assertRaises(ValueError):
        env.step([0])