diff --git a/tests/helpers.py b/tests/helpers.py index ad84c9b..38925dd 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -1,6 +1,5 @@ import pickle -from tests.quirks import KNOWN_GYM_CLOSE_BROKEN from tests.quirks import KNOWN_GYM_RENDER_NOT_IMPLEMENTED @@ -44,9 +43,4 @@ def step_env_with_gym_quirks(test_case, round_trip = pickle.loads(pickle.dumps(env)) assert round_trip.env.spec == env.env.spec - if not spec.id in KNOWN_GYM_CLOSE_BROKEN: - env.close() - else: - with test_case.assertRaisesRegex( - AttributeError, "'MjViewer' object has no attribute 'finish'"): - env.close() + env.close() diff --git a/tests/quirks.py b/tests/quirks.py index 495a9d8..77d1826 100644 --- a/tests/quirks.py +++ b/tests/quirks.py @@ -21,70 +21,6 @@ "Roulette-v0", ] -# openai/gym environments known to have a broken close() function. -# -# e.g. -# > gym/envs/robotics/robot_env.py", line 86, in close -# > self.viewer.finish() -# > AttributeError: 'MjViewer' object has no attribute 'finish' -# > -# -# Tests calling close() on these should verify they raise AttributeError -# ``` -# with self.assertRaises(NotImplementedError): -# env.close() -# ``` -# -# TODO: file a bug at openai/gym about this -KNOWN_GYM_CLOSE_BROKEN = [ - # Please keep alphabetized - "Ant-v2", - "FetchPickAndPlace-v1", - "FetchPickAndPlaceDense-v1", - "FetchPush-v1", - "FetchPushDense-v1", - "FetchReach-v1", - "FetchReachDense-v1", - "FetchSlide-v1", - "FetchSlideDense-v1", - "HalfCheetah-v2", - "HandManipulateBlock-v0", - "HandManipulateBlockDense-v0", - "HandManipulateBlockFull-v0", - "HandManipulateBlockFullDense-v0", - "HandManipulateBlockRotateParallel-v0", - "HandManipulateBlockRotateParallelDense-v0", - "HandManipulateBlockRotateXYZ-v0", - "HandManipulateBlockRotateXYZDense-v0", - "HandManipulateBlockRotateZ-v0", - "HandManipulateBlockRotateZDense-v0", - "HandManipulateEgg-v0", - "HandManipulateEggDense-v0", - "HandManipulateEggFull-v0", - "HandManipulateEggFullDense-v0", - "HandManipulateEggRotate-v0", - "HandManipulateEggRotateDense-v0", - "HandManipulatePen-v0", - "HandManipulatePenDense-v0", - "HandManipulatePenFull-v0", - "HandManipulatePenFullDense-v0", - "HandManipulatePenRotate-v0", - "HandManipulatePenRotateDense-v0", - "HandReach-v0", - "HandReachDense-v0", - "Hopper-v2", - "Humanoid-v2", - "HumanoidStandup-v2", - "InvertedDoublePendulum-v2", - "InvertedPendulum-v2", - "Pusher-v2", - "Reacher-v2", - "Striker-v2", - "Swimmer-v2", - "Thrower-v2", - "Walker2d-v2", -] - KNOWN_GYM_NOT_CLOSE_VIEWER = [ # Please keep alphabetized "gym.envs.mujoco",