@parameterized.named_parameters([('OneStep', 1), ('FiveSteps', 5)])
def testEnvMinDuration(self, min_duration):
    obs_spec = array_spec.BoundedArraySpec((2, 3), np.int32, (- 10), 10)
    env = random_py_environment.RandomPyEnvironment(obs_spec, episode_end_probability=0.9, min_duration=min_duration)
    num_episodes = 100
    for _ in range(num_episodes):
        time_step = env.step([0])
        self.assertTrue(time_step.is_first())
        num_steps = 0
        while (not time_step.is_last()):
            time_step = env.step([0])
            num_steps += 1
        self.assertGreaterEqual(num_steps, min_duration)
@parameterized.named_parameters([('OneStep', 1), ('FiveSteps', 5)])
def testEnvMinDuration(self, min_duration):
    obs_spec = array_spec.BoundedArraySpec((2, 3), np.int32, (- 10), 10)
    env = random_py_environment.RandomPyEnvironment(obs_spec, episode_end_probability=0.9, min_duration=min_duration)
    num_episodes = 100
    for _ in range(num_episodes):
        time_step = env.step([0])
        self.assertTrue(time_step.is_first())
        num_steps = 0
        while (not time_step.is_last()):
            time_step = env.step([0])
            num_steps += 1
        self.assertGreaterEqual(num_steps, min_duration)