Skip to content

Commit

Permalink
Do not automatically activate the virtual environment in `uv python f…
Browse files Browse the repository at this point in the history
…ind` tests
  • Loading branch information
zanieb committed Jan 17, 2025
1 parent 5434cc0 commit 677e473
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/uv/tests/it/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ impl TestContext {
.env(EnvVars::UV_PREVIEW, "1")
.env(EnvVars::UV_PYTHON_INSTALL_DIR, "")
.current_dir(&self.temp_dir);
self.add_shared_args(&mut command, true);
self.add_shared_args(&mut command, false);
command
}

Expand Down
12 changes: 4 additions & 8 deletions crates/uv/tests/it/python_find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ fn python_find() {
----- stdout -----
----- stderr -----
error: Failed to inspect Python interpreter from active virtual environment at `.venv/bin/python3`
Caused by: Python interpreter not found at `[VENV]/bin/python3`
error: No interpreter found in virtual environments, managed installations, or search path
"###);
}

Expand Down Expand Up @@ -125,8 +124,7 @@ fn python_find() {
----- stdout -----
----- stderr -----
error: Failed to inspect Python interpreter from active virtual environment at `.venv/bin/python3`
Caused by: Python interpreter not found at `[VENV]/bin/python3`
error: No interpreter found for PyPy in virtual environments, managed installations, or search path
"###);
}

Expand Down Expand Up @@ -538,8 +536,7 @@ fn python_find_unsupported_version() {
----- stdout -----
----- stderr -----
error: Failed to inspect Python interpreter from active virtual environment at `.venv/bin/python3`
Caused by: Python interpreter not found at `[VENV]/bin/python3`
error: No interpreter found for Python 4.2 in virtual environments, managed installations, or search path
"###);

// Request a low version with a range
Expand All @@ -549,8 +546,7 @@ fn python_find_unsupported_version() {
----- stdout -----
----- stderr -----
error: Failed to inspect Python interpreter from active virtual environment at `.venv/bin/python3`
Caused by: Python interpreter not found at `[VENV]/bin/python3`
error: No interpreter found for Python <3.0 in virtual environments, managed installations, or search path
"###);

// Request free-threaded Python on unsupported version
Expand Down

0 comments on commit 677e473

Please sign in to comment.