From 3331efe03c446ad25228dc7b00c35f023dc62ffb Mon Sep 17 00:00:00 2001 From: Ariel Kwiatkowski Date: Tue, 28 Sep 2021 19:45:52 +0200 Subject: [PATCH] Move all tests to gym/tests/... (#2425) * Moved all (?) tests to gym/tests * flake8 * Move all the tests into gym/gym/tests, this might fix all the import errors... hopefully * Move unittests back to envs * Fix unittest again * black * Fix to one test due to new paths --- gym/{envs => }/tests/__init__.py | 0 gym/{spaces/tests => tests/envs}/__init__.py | 0 gym/{vector/tests => tests/envs/robotics}/__init__.py | 0 .../tests => tests/envs/robotics/hand}/__init__.py | 0 .../gym => gym/tests}/envs/robotics/hand/test_manipulate.py | 3 +-- .../envs/robotics/hand/test_manipulate_touch_sensors.py | 2 +- {tests/gym => gym/tests}/envs/robotics/hand/test_reach.py | 2 +- gym/{envs/tests => tests/envs}/rollout.json | 0 gym/{envs/tests => tests/envs}/spec_list.py | 0 .../tests => tests/envs}/test_atari_legacy_env_specs.py | 0 gym/{envs/tests => tests/envs}/test_determinism.py | 2 +- gym/{envs/tests => tests/envs}/test_envs.py | 2 +- gym/{envs/tests => tests/envs}/test_envs_semantics.py | 2 +- gym/{envs/tests => tests/envs}/test_frozenlake_dfs.py | 0 .../tests => tests/envs}/test_mujoco_v2_to_v3_conversion.py | 2 +- gym/{envs/tests => tests/envs}/test_registration.py | 2 +- gym/{wrappers/tests => tests/spaces}/__init__.py | 0 gym/{spaces/tests => tests/spaces}/test_spaces.py | 0 gym/{spaces/tests => tests/spaces}/test_utils.py | 0 {tests => gym/tests/utils}/__init__.py | 0 gym/{utils/tests => tests/utils}/test_atexit.py | 0 gym/{utils/tests => tests/utils}/test_env_checker.py | 0 gym/{utils/tests => tests/utils}/test_seeding.py | 0 {tests/gym => gym/tests/vector}/__init__.py | 0 gym/{vector/tests => tests/vector}/test_async_vector_env.py | 2 +- gym/{vector/tests => tests/vector}/test_numpy_utils.py | 2 +- gym/{vector/tests => tests/vector}/test_shared_memory.py | 4 ++-- gym/{vector/tests => tests/vector}/test_spaces.py | 4 ++-- gym/{vector/tests => tests/vector}/test_sync_vector_env.py | 2 +- gym/{vector/tests => tests/vector}/test_vector_env.py | 2 +- .../tests => tests/vector}/test_vector_env_wrapper.py | 0 gym/{vector/tests => tests/vector}/utils.py | 0 {tests/gym/envs => gym/tests/wrappers}/__init__.py | 0 {tests/gym => gym/tests}/wrappers/flatten_test.py | 0 .../robotics => gym/tests/wrappers/monitoring}/__init__.py | 0 .../tests => tests/wrappers/monitoring}/helpers.py | 0 .../wrappers/monitoring}/test_video_recorder.py | 0 {tests/gym => gym/tests}/wrappers/nested_dict_test.py | 0 gym/{ => tests}/wrappers/test_atari_preprocessing.py | 0 gym/{ => tests}/wrappers/test_clip_action.py | 0 gym/{ => tests}/wrappers/test_filter_observation.py | 0 gym/{ => tests}/wrappers/test_flatten_observation.py | 0 gym/{ => tests}/wrappers/test_frame_stack.py | 0 gym/{ => tests}/wrappers/test_gray_scale_observation.py | 0 gym/{ => tests}/wrappers/test_normalize.py | 0 gym/{ => tests}/wrappers/test_pixel_observation.py | 0 gym/{ => tests}/wrappers/test_record_episode_statistics.py | 0 gym/{ => tests}/wrappers/test_record_video.py | 0 gym/{ => tests}/wrappers/test_rescale_action.py | 0 gym/{ => tests}/wrappers/test_resize_observation.py | 0 gym/{ => tests}/wrappers/test_time_aware_observation.py | 0 gym/{ => tests}/wrappers/test_transform_observation.py | 0 gym/{ => tests}/wrappers/test_transform_reward.py | 0 scripts/generate_json.py | 6 +++--- tests/gym/envs/robotics/hand/__init__.py | 0 tests/gym/wrappers/__init__.py | 0 56 files changed, 19 insertions(+), 20 deletions(-) rename gym/{envs => }/tests/__init__.py (100%) rename gym/{spaces/tests => tests/envs}/__init__.py (100%) rename gym/{vector/tests => tests/envs/robotics}/__init__.py (100%) rename gym/{wrappers/monitoring/tests => tests/envs/robotics/hand}/__init__.py (100%) rename {tests/gym => gym/tests}/envs/robotics/hand/test_manipulate.py (88%) rename {tests/gym => gym/tests}/envs/robotics/hand/test_manipulate_touch_sensors.py (90%) rename {tests/gym => gym/tests}/envs/robotics/hand/test_reach.py (87%) rename gym/{envs/tests => tests/envs}/rollout.json (100%) rename gym/{envs/tests => tests/envs}/spec_list.py (100%) rename gym/{envs/tests => tests/envs}/test_atari_legacy_env_specs.py (100%) rename gym/{envs/tests => tests/envs}/test_determinism.py (98%) rename gym/{envs/tests => tests/envs}/test_envs.py (98%) rename gym/{envs/tests => tests/envs}/test_envs_semantics.py (98%) rename gym/{envs/tests => tests/envs}/test_frozenlake_dfs.py (100%) rename gym/{envs/tests => tests/envs}/test_mujoco_v2_to_v3_conversion.py (97%) rename gym/{envs/tests => tests/envs}/test_registration.py (97%) rename gym/{wrappers/tests => tests/spaces}/__init__.py (100%) rename gym/{spaces/tests => tests/spaces}/test_spaces.py (100%) rename gym/{spaces/tests => tests/spaces}/test_utils.py (100%) rename {tests => gym/tests/utils}/__init__.py (100%) rename gym/{utils/tests => tests/utils}/test_atexit.py (100%) rename gym/{utils/tests => tests/utils}/test_env_checker.py (100%) rename gym/{utils/tests => tests/utils}/test_seeding.py (100%) rename {tests/gym => gym/tests/vector}/__init__.py (100%) rename gym/{vector/tests => tests/vector}/test_async_vector_env.py (99%) rename gym/{vector/tests => tests/vector}/test_numpy_utils.py (99%) rename gym/{vector/tests => tests/vector}/test_shared_memory.py (98%) rename gym/{vector/tests => tests/vector}/test_spaces.py (96%) rename gym/{vector/tests => tests/vector}/test_sync_vector_env.py (97%) rename gym/{vector/tests => tests/vector}/test_vector_env.py (97%) rename gym/{vector/tests => tests/vector}/test_vector_env_wrapper.py (100%) rename gym/{vector/tests => tests/vector}/utils.py (100%) rename {tests/gym/envs => gym/tests/wrappers}/__init__.py (100%) rename {tests/gym => gym/tests}/wrappers/flatten_test.py (100%) rename {tests/gym/envs/robotics => gym/tests/wrappers/monitoring}/__init__.py (100%) rename gym/{wrappers/monitoring/tests => tests/wrappers/monitoring}/helpers.py (100%) rename gym/{wrappers/monitoring/tests => tests/wrappers/monitoring}/test_video_recorder.py (100%) rename {tests/gym => gym/tests}/wrappers/nested_dict_test.py (100%) rename gym/{ => tests}/wrappers/test_atari_preprocessing.py (100%) rename gym/{ => tests}/wrappers/test_clip_action.py (100%) rename gym/{ => tests}/wrappers/test_filter_observation.py (100%) rename gym/{ => tests}/wrappers/test_flatten_observation.py (100%) rename gym/{ => tests}/wrappers/test_frame_stack.py (100%) rename gym/{ => tests}/wrappers/test_gray_scale_observation.py (100%) rename gym/{ => tests}/wrappers/test_normalize.py (100%) rename gym/{ => tests}/wrappers/test_pixel_observation.py (100%) rename gym/{ => tests}/wrappers/test_record_episode_statistics.py (100%) rename gym/{ => tests}/wrappers/test_record_video.py (100%) rename gym/{ => tests}/wrappers/test_rescale_action.py (100%) rename gym/{ => tests}/wrappers/test_resize_observation.py (100%) rename gym/{ => tests}/wrappers/test_time_aware_observation.py (100%) rename gym/{ => tests}/wrappers/test_transform_observation.py (100%) rename gym/{ => tests}/wrappers/test_transform_reward.py (100%) delete mode 100644 tests/gym/envs/robotics/hand/__init__.py delete mode 100644 tests/gym/wrappers/__init__.py diff --git a/gym/envs/tests/__init__.py b/gym/tests/__init__.py similarity index 100% rename from gym/envs/tests/__init__.py rename to gym/tests/__init__.py diff --git a/gym/spaces/tests/__init__.py b/gym/tests/envs/__init__.py similarity index 100% rename from gym/spaces/tests/__init__.py rename to gym/tests/envs/__init__.py diff --git a/gym/vector/tests/__init__.py b/gym/tests/envs/robotics/__init__.py similarity index 100% rename from gym/vector/tests/__init__.py rename to gym/tests/envs/robotics/__init__.py diff --git a/gym/wrappers/monitoring/tests/__init__.py b/gym/tests/envs/robotics/hand/__init__.py similarity index 100% rename from gym/wrappers/monitoring/tests/__init__.py rename to gym/tests/envs/robotics/hand/__init__.py diff --git a/tests/gym/envs/robotics/hand/test_manipulate.py b/gym/tests/envs/robotics/hand/test_manipulate.py similarity index 88% rename from tests/gym/envs/robotics/hand/test_manipulate.py rename to gym/tests/envs/robotics/hand/test_manipulate.py index 2c0006175d6..7b1934bc81f 100644 --- a/tests/gym/envs/robotics/hand/test_manipulate.py +++ b/gym/tests/envs/robotics/hand/test_manipulate.py @@ -1,10 +1,9 @@ import pickle -import unittest import pytest from gym import envs -from gym.envs.tests.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE +from gym.tests.envs.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE ENVIRONMENT_IDS = ( diff --git a/tests/gym/envs/robotics/hand/test_manipulate_touch_sensors.py b/gym/tests/envs/robotics/hand/test_manipulate_touch_sensors.py similarity index 90% rename from tests/gym/envs/robotics/hand/test_manipulate_touch_sensors.py rename to gym/tests/envs/robotics/hand/test_manipulate_touch_sensors.py index 141e55452ab..b3384af06eb 100644 --- a/tests/gym/envs/robotics/hand/test_manipulate_touch_sensors.py +++ b/gym/tests/envs/robotics/hand/test_manipulate_touch_sensors.py @@ -3,7 +3,7 @@ import pytest from gym import envs -from gym.envs.tests.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE +from gym.tests.envs.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE ENVIRONMENT_IDS = ( diff --git a/tests/gym/envs/robotics/hand/test_reach.py b/gym/tests/envs/robotics/hand/test_reach.py similarity index 87% rename from tests/gym/envs/robotics/hand/test_reach.py rename to gym/tests/envs/robotics/hand/test_reach.py index 13fccb283f1..f698564edb8 100644 --- a/tests/gym/envs/robotics/hand/test_reach.py +++ b/gym/tests/envs/robotics/hand/test_reach.py @@ -3,7 +3,7 @@ import pytest from gym import envs -from gym.envs.tests.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE +from gym.tests.envs.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE @pytest.mark.skipif(skip_mujoco, reason=SKIP_MUJOCO_WARNING_MESSAGE) diff --git a/gym/envs/tests/rollout.json b/gym/tests/envs/rollout.json similarity index 100% rename from gym/envs/tests/rollout.json rename to gym/tests/envs/rollout.json diff --git a/gym/envs/tests/spec_list.py b/gym/tests/envs/spec_list.py similarity index 100% rename from gym/envs/tests/spec_list.py rename to gym/tests/envs/spec_list.py diff --git a/gym/envs/tests/test_atari_legacy_env_specs.py b/gym/tests/envs/test_atari_legacy_env_specs.py similarity index 100% rename from gym/envs/tests/test_atari_legacy_env_specs.py rename to gym/tests/envs/test_atari_legacy_env_specs.py diff --git a/gym/envs/tests/test_determinism.py b/gym/tests/envs/test_determinism.py similarity index 98% rename from gym/envs/tests/test_determinism.py rename to gym/tests/envs/test_determinism.py index 1505c559d2f..8c024344dba 100644 --- a/gym/envs/tests/test_determinism.py +++ b/gym/tests/envs/test_determinism.py @@ -1,7 +1,7 @@ import numpy as np import pytest -from gym.envs.tests.spec_list import spec_list +from gym.tests.envs.spec_list import spec_list @pytest.mark.parametrize("spec", spec_list) diff --git a/gym/envs/tests/test_envs.py b/gym/tests/envs/test_envs.py similarity index 98% rename from gym/envs/tests/test_envs.py rename to gym/tests/envs/test_envs.py index 6a1b923a5f6..5a98aa9c435 100644 --- a/gym/envs/tests/test_envs.py +++ b/gym/tests/envs/test_envs.py @@ -2,7 +2,7 @@ import numpy as np from gym import envs -from gym.envs.tests.spec_list import spec_list +from gym.tests.envs.spec_list import spec_list from gym.spaces import Box from gym.utils.env_checker import check_env diff --git a/gym/envs/tests/test_envs_semantics.py b/gym/tests/envs/test_envs_semantics.py similarity index 98% rename from gym/envs/tests/test_envs_semantics.py rename to gym/tests/envs/test_envs_semantics.py index b82e2eca395..06a1362aae1 100644 --- a/gym/envs/tests/test_envs_semantics.py +++ b/gym/tests/envs/test_envs_semantics.py @@ -10,7 +10,7 @@ import pytest from gym import spaces, logger -from gym.envs.tests.spec_list import spec_list +from gym.tests.envs.spec_list import spec_list DATA_DIR = os.path.dirname(__file__) ROLLOUT_STEPS = 100 diff --git a/gym/envs/tests/test_frozenlake_dfs.py b/gym/tests/envs/test_frozenlake_dfs.py similarity index 100% rename from gym/envs/tests/test_frozenlake_dfs.py rename to gym/tests/envs/test_frozenlake_dfs.py diff --git a/gym/envs/tests/test_mujoco_v2_to_v3_conversion.py b/gym/tests/envs/test_mujoco_v2_to_v3_conversion.py similarity index 97% rename from gym/envs/tests/test_mujoco_v2_to_v3_conversion.py rename to gym/tests/envs/test_mujoco_v2_to_v3_conversion.py index a379a84546a..e57def68df7 100644 --- a/gym/envs/tests/test_mujoco_v2_to_v3_conversion.py +++ b/gym/tests/envs/test_mujoco_v2_to_v3_conversion.py @@ -1,7 +1,7 @@ import unittest import numpy as np from gym import envs -from gym.envs.tests.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE +from gym.tests.envs.spec_list import skip_mujoco, SKIP_MUJOCO_WARNING_MESSAGE def verify_environments_match( diff --git a/gym/envs/tests/test_registration.py b/gym/tests/envs/test_registration.py similarity index 97% rename from gym/envs/tests/test_registration.py rename to gym/tests/envs/test_registration.py index d4d59e11291..695c5002519 100644 --- a/gym/envs/tests/test_registration.py +++ b/gym/tests/envs/test_registration.py @@ -14,7 +14,7 @@ def __init__(self, arg1, arg2, arg3): gym.register( id="test.ArgumentEnv-v0", - entry_point="gym.envs.tests.test_registration:ArgumentEnv", + entry_point="gym.tests.envs.test_registration:ArgumentEnv", kwargs={ "arg1": "arg1", "arg2": "arg2", diff --git a/gym/wrappers/tests/__init__.py b/gym/tests/spaces/__init__.py similarity index 100% rename from gym/wrappers/tests/__init__.py rename to gym/tests/spaces/__init__.py diff --git a/gym/spaces/tests/test_spaces.py b/gym/tests/spaces/test_spaces.py similarity index 100% rename from gym/spaces/tests/test_spaces.py rename to gym/tests/spaces/test_spaces.py diff --git a/gym/spaces/tests/test_utils.py b/gym/tests/spaces/test_utils.py similarity index 100% rename from gym/spaces/tests/test_utils.py rename to gym/tests/spaces/test_utils.py diff --git a/tests/__init__.py b/gym/tests/utils/__init__.py similarity index 100% rename from tests/__init__.py rename to gym/tests/utils/__init__.py diff --git a/gym/utils/tests/test_atexit.py b/gym/tests/utils/test_atexit.py similarity index 100% rename from gym/utils/tests/test_atexit.py rename to gym/tests/utils/test_atexit.py diff --git a/gym/utils/tests/test_env_checker.py b/gym/tests/utils/test_env_checker.py similarity index 100% rename from gym/utils/tests/test_env_checker.py rename to gym/tests/utils/test_env_checker.py diff --git a/gym/utils/tests/test_seeding.py b/gym/tests/utils/test_seeding.py similarity index 100% rename from gym/utils/tests/test_seeding.py rename to gym/tests/utils/test_seeding.py diff --git a/tests/gym/__init__.py b/gym/tests/vector/__init__.py similarity index 100% rename from tests/gym/__init__.py rename to gym/tests/vector/__init__.py diff --git a/gym/vector/tests/test_async_vector_env.py b/gym/tests/vector/test_async_vector_env.py similarity index 99% rename from gym/vector/tests/test_async_vector_env.py rename to gym/tests/vector/test_async_vector_env.py index 65506cba596..b400aecf645 100644 --- a/gym/vector/tests/test_async_vector_env.py +++ b/gym/tests/vector/test_async_vector_env.py @@ -4,7 +4,7 @@ from multiprocessing import TimeoutError from gym.spaces import Box, Tuple from gym.error import AlreadyPendingCallError, NoAsyncCallError, ClosedEnvironmentError -from gym.vector.tests.utils import ( +from gym.tests.vector.utils import ( CustomSpace, make_env, make_slow_env, diff --git a/gym/vector/tests/test_numpy_utils.py b/gym/tests/vector/test_numpy_utils.py similarity index 99% rename from gym/vector/tests/test_numpy_utils.py rename to gym/tests/vector/test_numpy_utils.py index 6c19e7ab4a8..c7b0ad75510 100644 --- a/gym/vector/tests/test_numpy_utils.py +++ b/gym/tests/vector/test_numpy_utils.py @@ -5,7 +5,7 @@ from gym.spaces import Tuple, Dict from gym.vector.utils.spaces import _BaseGymSpaces -from gym.vector.tests.utils import spaces +from gym.tests.vector.utils import spaces from gym.vector.utils.numpy_utils import concatenate, create_empty_array diff --git a/gym/vector/tests/test_shared_memory.py b/gym/tests/vector/test_shared_memory.py similarity index 98% rename from gym/vector/tests/test_shared_memory.py rename to gym/tests/vector/test_shared_memory.py index f59a4abd815..3310773a6ec 100644 --- a/gym/vector/tests/test_shared_memory.py +++ b/gym/tests/vector/test_shared_memory.py @@ -6,10 +6,10 @@ from multiprocessing import Array, Process from collections import OrderedDict -from gym.spaces import Box, Tuple, Dict +from gym.spaces import Tuple, Dict from gym.error import CustomSpaceError from gym.vector.utils.spaces import _BaseGymSpaces -from gym.vector.tests.utils import spaces, custom_spaces +from gym.tests.vector.utils import spaces, custom_spaces from gym.vector.utils.shared_memory import ( create_shared_memory, diff --git a/gym/vector/tests/test_spaces.py b/gym/tests/vector/test_spaces.py similarity index 96% rename from gym/vector/tests/test_spaces.py rename to gym/tests/vector/test_spaces.py index a0738d0404a..10b8b1013ce 100644 --- a/gym/vector/tests/test_spaces.py +++ b/gym/tests/vector/test_spaces.py @@ -2,9 +2,9 @@ import numpy as np from gym.spaces import Box, MultiDiscrete, Tuple, Dict -from gym.vector.tests.utils import spaces, custom_spaces, CustomSpace +from gym.tests.vector.utils import spaces, custom_spaces, CustomSpace -from gym.vector.utils.spaces import _BaseGymSpaces, batch_space +from gym.vector.utils.spaces import batch_space expected_batch_spaces_4 = [ Box(low=-1.0, high=1.0, shape=(4,), dtype=np.float64), diff --git a/gym/vector/tests/test_sync_vector_env.py b/gym/tests/vector/test_sync_vector_env.py similarity index 97% rename from gym/vector/tests/test_sync_vector_env.py rename to gym/tests/vector/test_sync_vector_env.py index caeeb37b511..4a28c13c655 100644 --- a/gym/vector/tests/test_sync_vector_env.py +++ b/gym/tests/vector/test_sync_vector_env.py @@ -2,7 +2,7 @@ import numpy as np from gym.spaces import Box, Tuple -from gym.vector.tests.utils import CustomSpace, make_env, make_custom_space_env +from gym.tests.vector.utils import CustomSpace, make_env, make_custom_space_env from gym.vector.sync_vector_env import SyncVectorEnv diff --git a/gym/vector/tests/test_vector_env.py b/gym/tests/vector/test_vector_env.py similarity index 97% rename from gym/vector/tests/test_vector_env.py rename to gym/tests/vector/test_vector_env.py index bcbfd156fa2..b0e5e43331b 100644 --- a/gym/vector/tests/test_vector_env.py +++ b/gym/tests/vector/test_vector_env.py @@ -2,7 +2,7 @@ import numpy as np from gym.spaces import Tuple -from gym.vector.tests.utils import CustomSpace, make_env +from gym.tests.vector.utils import CustomSpace, make_env from gym.vector.async_vector_env import AsyncVectorEnv from gym.vector.sync_vector_env import SyncVectorEnv diff --git a/gym/vector/tests/test_vector_env_wrapper.py b/gym/tests/vector/test_vector_env_wrapper.py similarity index 100% rename from gym/vector/tests/test_vector_env_wrapper.py rename to gym/tests/vector/test_vector_env_wrapper.py diff --git a/gym/vector/tests/utils.py b/gym/tests/vector/utils.py similarity index 100% rename from gym/vector/tests/utils.py rename to gym/tests/vector/utils.py diff --git a/tests/gym/envs/__init__.py b/gym/tests/wrappers/__init__.py similarity index 100% rename from tests/gym/envs/__init__.py rename to gym/tests/wrappers/__init__.py diff --git a/tests/gym/wrappers/flatten_test.py b/gym/tests/wrappers/flatten_test.py similarity index 100% rename from tests/gym/wrappers/flatten_test.py rename to gym/tests/wrappers/flatten_test.py diff --git a/tests/gym/envs/robotics/__init__.py b/gym/tests/wrappers/monitoring/__init__.py similarity index 100% rename from tests/gym/envs/robotics/__init__.py rename to gym/tests/wrappers/monitoring/__init__.py diff --git a/gym/wrappers/monitoring/tests/helpers.py b/gym/tests/wrappers/monitoring/helpers.py similarity index 100% rename from gym/wrappers/monitoring/tests/helpers.py rename to gym/tests/wrappers/monitoring/helpers.py diff --git a/gym/wrappers/monitoring/tests/test_video_recorder.py b/gym/tests/wrappers/monitoring/test_video_recorder.py similarity index 100% rename from gym/wrappers/monitoring/tests/test_video_recorder.py rename to gym/tests/wrappers/monitoring/test_video_recorder.py diff --git a/tests/gym/wrappers/nested_dict_test.py b/gym/tests/wrappers/nested_dict_test.py similarity index 100% rename from tests/gym/wrappers/nested_dict_test.py rename to gym/tests/wrappers/nested_dict_test.py diff --git a/gym/wrappers/test_atari_preprocessing.py b/gym/tests/wrappers/test_atari_preprocessing.py similarity index 100% rename from gym/wrappers/test_atari_preprocessing.py rename to gym/tests/wrappers/test_atari_preprocessing.py diff --git a/gym/wrappers/test_clip_action.py b/gym/tests/wrappers/test_clip_action.py similarity index 100% rename from gym/wrappers/test_clip_action.py rename to gym/tests/wrappers/test_clip_action.py diff --git a/gym/wrappers/test_filter_observation.py b/gym/tests/wrappers/test_filter_observation.py similarity index 100% rename from gym/wrappers/test_filter_observation.py rename to gym/tests/wrappers/test_filter_observation.py diff --git a/gym/wrappers/test_flatten_observation.py b/gym/tests/wrappers/test_flatten_observation.py similarity index 100% rename from gym/wrappers/test_flatten_observation.py rename to gym/tests/wrappers/test_flatten_observation.py diff --git a/gym/wrappers/test_frame_stack.py b/gym/tests/wrappers/test_frame_stack.py similarity index 100% rename from gym/wrappers/test_frame_stack.py rename to gym/tests/wrappers/test_frame_stack.py diff --git a/gym/wrappers/test_gray_scale_observation.py b/gym/tests/wrappers/test_gray_scale_observation.py similarity index 100% rename from gym/wrappers/test_gray_scale_observation.py rename to gym/tests/wrappers/test_gray_scale_observation.py diff --git a/gym/wrappers/test_normalize.py b/gym/tests/wrappers/test_normalize.py similarity index 100% rename from gym/wrappers/test_normalize.py rename to gym/tests/wrappers/test_normalize.py diff --git a/gym/wrappers/test_pixel_observation.py b/gym/tests/wrappers/test_pixel_observation.py similarity index 100% rename from gym/wrappers/test_pixel_observation.py rename to gym/tests/wrappers/test_pixel_observation.py diff --git a/gym/wrappers/test_record_episode_statistics.py b/gym/tests/wrappers/test_record_episode_statistics.py similarity index 100% rename from gym/wrappers/test_record_episode_statistics.py rename to gym/tests/wrappers/test_record_episode_statistics.py diff --git a/gym/wrappers/test_record_video.py b/gym/tests/wrappers/test_record_video.py similarity index 100% rename from gym/wrappers/test_record_video.py rename to gym/tests/wrappers/test_record_video.py diff --git a/gym/wrappers/test_rescale_action.py b/gym/tests/wrappers/test_rescale_action.py similarity index 100% rename from gym/wrappers/test_rescale_action.py rename to gym/tests/wrappers/test_rescale_action.py diff --git a/gym/wrappers/test_resize_observation.py b/gym/tests/wrappers/test_resize_observation.py similarity index 100% rename from gym/wrappers/test_resize_observation.py rename to gym/tests/wrappers/test_resize_observation.py diff --git a/gym/wrappers/test_time_aware_observation.py b/gym/tests/wrappers/test_time_aware_observation.py similarity index 100% rename from gym/wrappers/test_time_aware_observation.py rename to gym/tests/wrappers/test_time_aware_observation.py diff --git a/gym/wrappers/test_transform_observation.py b/gym/tests/wrappers/test_transform_observation.py similarity index 100% rename from gym/wrappers/test_transform_observation.py rename to gym/tests/wrappers/test_transform_observation.py diff --git a/gym/wrappers/test_transform_reward.py b/gym/tests/wrappers/test_transform_reward.py similarity index 100% rename from gym/wrappers/test_transform_reward.py rename to gym/tests/wrappers/test_transform_reward.py diff --git a/scripts/generate_json.py b/scripts/generate_json.py index b5aa706d6d7..38456afc3a7 100644 --- a/scripts/generate_json.py +++ b/scripts/generate_json.py @@ -1,11 +1,11 @@ -from gym import envs, spaces, logger +from gym import envs, logger import json import os import sys import argparse -from gym.envs.tests.spec_list import should_skip_env_spec_for_tests -from gym.envs.tests.test_envs_semantics import generate_rollout_hash, hash_object +from gym.tests.envs.spec_list import should_skip_env_spec_for_tests +from gym.tests import generate_rollout_hash DATA_DIR = os.path.join(os.path.dirname(__file__), os.pardir, "gym", "envs", "tests") ROLLOUT_STEPS = 100 diff --git a/tests/gym/envs/robotics/hand/__init__.py b/tests/gym/envs/robotics/hand/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/gym/wrappers/__init__.py b/tests/gym/wrappers/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000