From cd76326741d6900b6115f050cd58bc72c663e9d2 Mon Sep 17 00:00:00 2001 From: Adam Gleave Date: Wed, 4 Oct 2023 19:34:13 -0700 Subject: [PATCH] Fix MacOS Pipeline: Include tests not in subdirectories (#797) * Fix glob expansion by adding quotes and add diagnostics * Remove workaround no longer needed with Gymnasium * Bugfix in sys.modules restore * Try avoiding echo to prevent one big test filename --- .circleci/config.yml | 5 ++++- docs/requirements.txt | 2 -- readthedocs.yml | 2 -- tests/util/test_wb_logger.py | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index d8a9f0af0..7eb853e7d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -358,7 +358,10 @@ jobs: name: run tests command: | source ~/venv/bin/activate - TESTFILES=$(circleci tests glob tests/**/test*.py | circleci tests split --split-by=timings) + ALL_TESTFILES=$(circleci tests glob "tests/**/test*.py") + echo "All testfiles: ${ALL_TESTFILES}" + TESTFILES=$(circleci tests glob "tests/**/test*.py" | circleci tests split --split-by=timings) + echo "This shard testing: ${TESTFILES}" pytest -n auto --junitxml=/tmp/test-reports/junit.xml -vv $TESTFILES - save-pytest-cache diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 86e3a531b..000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -# specific version needed for gym==0.21.0 -setuptools==65.5.0 diff --git a/readthedocs.yml b/readthedocs.yml index bbdaa11ea..e6717c805 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -12,8 +12,6 @@ build: python: install: - # TODO(GH#707): remove docs/requirements.txt once Gym upgraded - - requirements: docs/requirements.txt - method: pip path: . extra_requirements: diff --git a/tests/util/test_wb_logger.py b/tests/util/test_wb_logger.py index e9b8396cf..2fdb30d9d 100644 --- a/tests/util/test_wb_logger.py +++ b/tests/util/test_wb_logger.py @@ -122,4 +122,4 @@ def test_wandb_module_import_error(): with pytest.raises(ModuleNotFoundError, match=r"Trying to log data.*"): logger.configure(format_strs=["wandb"]) finally: - sys.modules[wandb] = wandb_module + sys.modules["wandb"] = wandb_module