def test_gym_task_render(mock_gym, fix_env): # Assign mock_gym.make.return_value = fix_env task = GymTask("CanRender", can_render=True) # Act task.render() # Assert assert fix_env.render.called_once_with("rgb_array")
def test_gym_task_render_cannot_render(mock_gym, fix_env): # Assign mock_gym.make.return_value = fix_env task = GymTask("CanRender", can_render=False) # Act task.render() # Assert assert not fix_env.render.called