diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index d1ff37242..f3d86973b 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -431,6 +431,9 @@ def handle_test_env() -> None: # We do not want the default client_context to be initialized. write_env("DISABLE_CONTEXT") + if test_name == "numpy": + UV_ARGS.append("--with numpy") + if test_name == "perf": data_dir = ROOT / "specifications/source/benchmarking/data" if not data_dir.exists(): diff --git a/.evergreen/scripts/utils.py b/.evergreen/scripts/utils.py index 2bc9c720d..02238645c 100644 --- a/.evergreen/scripts/utils.py +++ b/.evergreen/scripts/utils.py @@ -44,6 +44,7 @@ TEST_SUITE_MAP = { "mockupdb": "mockupdb", "ocsp": "ocsp", "perf": "perf", + "numpy": "", } # Tests that require a sub test suite. diff --git a/justfile b/justfile index be4b69a9b..82b1ac91d 100644 --- a/justfile +++ b/justfile @@ -60,12 +60,9 @@ test *args="-v --durations=5 --maxfail=10": && resync uv run --extra test python -m pytest {{args}} [group('test')] -test-numpy: && resync - if [ "${COVERAGE:-}" = "1" ]; then \ - uv run --extra test --group coverage --with numpy coverage run -m pytest test/test_bson.py; \ - else \ - uv run --extra test --with numpy python -m pytest test/test_bson.py; \ - fi +test-numpy *args="": && resync + just setup-tests numpy {{args}} + just run-tests test/test_bson.py [group('test')] run-tests *args: && resync