def testRendersImage(self):
    action_spec = array_spec.BoundedArraySpec((1,), np.int32, (- 10), 10)
    observation_spec = array_spec.BoundedArraySpec((1,), np.int32, (- 10), 10)
    env = random_py_environment.RandomPyEnvironment(observation_spec, action_spec, render_size=(4, 4, 3))
    env.reset()
    img = env.render()
    self.assertTrue(np.all((img < 256)))
    self.assertTrue(np.all((img >= 0)))
    self.assertEqual((4, 4, 3), img.shape)
    self.assertEqual(np.uint8, img.dtype)
def testRendersImage(self):
    action_spec = array_spec.BoundedArraySpec((1,), np.int32, (- 10), 10)
    observation_spec = array_spec.BoundedArraySpec((1,), np.int32, (- 10), 10)
    env = random_py_environment.RandomPyEnvironment(observation_spec, action_spec, render_size=(4, 4, 3))
    env.reset()
    img = env.render()
    self.assertTrue(np.all((img < 256)))
    self.assertTrue(np.all((img >= 0)))
    self.assertEqual((4, 4, 3), img.shape)
    self.assertEqual(np.uint8, img.dtype)