mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 14:10:30 +00:00
* try build with box2d-kengz * test box2d envs * use box2d-py in tox.ini for tests * box2d-py instead of box2d-kengz in box2d dependencies * test dependencies in tox.ini use dependencies in setup.py * further cleanups of tox.ini * further cleanups * added scipy to list of requirements
21 lines
891 B
Python
21 lines
891 B
Python
from gym import envs, logger
|
|
import os
|
|
|
|
def should_skip_env_spec_for_tests(spec):
|
|
# We skip tests for envs that require dependencies or are otherwise
|
|
# troublesome to run frequently
|
|
ep = spec._entry_point
|
|
# Skip mujoco tests for pull request CI
|
|
skip_mujoco = not (os.environ.get('MUJOCO_KEY_BUNDLE') or os.path.exists(os.path.expanduser('~/.mujoco')))
|
|
if skip_mujoco and ep.startswith('gym.envs.mujoco:'):
|
|
return True
|
|
if ( 'GoEnv' in ep or
|
|
'HexEnv' in ep or
|
|
(ep.startswith("gym.envs.atari") and not spec.id.startswith("Pong") and not spec.id.startswith("Seaquest"))
|
|
):
|
|
logger.warn("Skipping tests for env {}".format(ep))
|
|
return True
|
|
return False
|
|
|
|
spec_list = [spec for spec in sorted(envs.registry.all(), key=lambda x: x.id) if spec._entry_point is not None and not should_skip_env_spec_for_tests(spec)]
|