PYTHON-5754 Fix USE_ACTIVE_VENV support (#2728)
This commit is contained in:
parent
b6cc22ffdd
commit
3d89d9faca
@ -153,6 +153,10 @@ def handle_test_env() -> None:
|
||||
# Start compiling the args we'll pass to uv.
|
||||
UV_ARGS = ["--extra test --no-group dev"]
|
||||
|
||||
# If USE_ACTIVE_VENV is set, add --active to UV_ARGS so run-tests.sh uses the active venv.
|
||||
if is_set("USE_ACTIVE_VENV"):
|
||||
UV_ARGS.append("--active")
|
||||
|
||||
test_title = test_name
|
||||
if sub_test_name:
|
||||
test_title += f" {sub_test_name}"
|
||||
|
||||
4
justfile
4
justfile
@ -57,7 +57,9 @@ lint-manual *args="": && resync
|
||||
|
||||
[group('test')]
|
||||
test *args="-v --durations=5 --maxfail=10": && resync
|
||||
uv run --extra test python -m pytest {{args}}
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
uv run ${USE_ACTIVE_VENV:+--active} --extra test python -m pytest {{args}}
|
||||
|
||||
[group('test')]
|
||||
test-numpy *args="": && resync
|
||||
|
||||
Loading…
Reference in New Issue
Block a user