fix numpy handling

This commit is contained in:
Steven Silvester 2026-02-11 11:45:23 -06:00
parent 05e93fbd9a
commit f3deff5a6d
No known key found for this signature in database
3 changed files with 7 additions and 6 deletions

View File

@ -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():

View File

@ -44,6 +44,7 @@ TEST_SUITE_MAP = {
"mockupdb": "mockupdb",
"ocsp": "ocsp",
"perf": "perf",
"numpy": "",
}
# Tests that require a sub test suite.

View File

@ -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