From 42beb184fdf861b714a914422ebe66933084de8a Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 18 Jun 2024 08:03:02 -0500 Subject: [PATCH] Remove filter for venv in working directory --- crates/uv/tests/common/mod.rs | 7 ------- crates/uv/tests/lock.rs | 2 +- crates/uv/tests/run.rs | 6 +++--- crates/uv/tests/venv.rs | 24 ++++++++++++------------ crates/uv/tests/workspace.rs | 4 ++-- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/crates/uv/tests/common/mod.rs b/crates/uv/tests/common/mod.rs index 38e82fd39940..b4fc23f2cbf1 100644 --- a/crates/uv/tests/common/mod.rs +++ b/crates/uv/tests/common/mod.rs @@ -183,13 +183,6 @@ impl TestContext { "[SITE_PACKAGES]/".to_string(), )); }; - filters.push(( - Self::path_pattern( - venv.strip_prefix(&temp_dir) - .expect("The test virtual environment directory is always in the tempdir"), - ), - "[VENV]/".to_string(), - )); // Filter non-deterministic temporary directory names // Note we apply this _after_ all the full paths to avoid breaking their matching diff --git a/crates/uv/tests/lock.rs b/crates/uv/tests/lock.rs index bc0378dcf574..cbddbb72bbeb 100644 --- a/crates/uv/tests/lock.rs +++ b/crates/uv/tests/lock.rs @@ -1894,7 +1894,7 @@ fn lock_requires_python() -> Result<()> { ----- stderr ----- warning: `uv sync` is experimental and may change without warning. - Removing virtual environment at: [VENV]/ + Removing virtual environment at: .venv error: No interpreter found for Python >=3.12 in provided path, active virtual environment, or search path "###); diff --git a/crates/uv/tests/run.rs b/crates/uv/tests/run.rs index 0c94272758c2..7ecef9b6676c 100644 --- a/crates/uv/tests/run.rs +++ b/crates/uv/tests/run.rs @@ -52,7 +52,7 @@ fn run_with_python_version() -> Result<()> { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON-3.12] - Creating virtualenv at: [VENV]/ + Creating virtualenv at: .venv Resolved 5 packages in [TIME] Downloaded 4 packages in [TIME] Installed 4 packages in [TIME] @@ -102,9 +102,9 @@ fn run_with_python_version() -> Result<()> { 3.6.0 ----- stderr ----- - Removing virtual environment at: [VENV]/ + Removing virtual environment at: .venv Using Python 3.11.[X] interpreter at: [PYTHON-3.11] - Creating virtualenv at: [VENV]/ + Creating virtualenv at: .venv Resolved 5 packages in [TIME] Downloaded 4 packages in [TIME] Installed 4 packages in [TIME] diff --git a/crates/uv/tests/venv.rs b/crates/uv/tests/venv.rs index c8b224662405..c119f864013f 100644 --- a/crates/uv/tests/venv.rs +++ b/crates/uv/tests/venv.rs @@ -24,7 +24,7 @@ fn create_venv() { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtualenv at: [VENV]/ - Activate with: source [VENV]/bin/activate + Activate with: source .venv/bin/activate "### ); @@ -42,7 +42,7 @@ fn create_venv() { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtualenv at: [VENV]/ - Activate with: source [VENV]/bin/activate + Activate with: source .venv/bin/activate "### ); @@ -61,8 +61,8 @@ fn create_venv_defaults_to_cwd() { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON-3.12] - Creating virtualenv at: [VENV]/ - Activate with: source [VENV]/bin/activate + Creating virtualenv at: .venv + Activate with: source .venv/bin/activate "### ); @@ -82,8 +82,8 @@ fn create_venv_ignores_virtual_env_variable() { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON-3.12] - Creating virtualenv at: [VENV]/ - Activate with: source [VENV]/bin/activate + Creating virtualenv at: .venv + Activate with: source .venv/bin/activate "### ); } @@ -104,7 +104,7 @@ fn seed() { Using Python 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtualenv at: [VENV]/ + pip==24.0 - Activate with: source [VENV]/bin/activate + Activate with: source .venv/bin/activate "### ); @@ -129,7 +129,7 @@ fn seed_older_python_version() { + pip==24.0 + setuptools==69.2.0 + wheel==0.43.0 - Activate with: source [VENV]/bin/activate + Activate with: source .venv/bin/activate "### ); @@ -280,7 +280,7 @@ fn empty_dir_exists() -> Result<()> { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtualenv at: [VENV]/ - Activate with: source [VENV]/bin/activate + Activate with: source .venv/bin/activate "### ); @@ -357,7 +357,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtualenv at: [VENV]/ - Activate with: source [VENV]/bin/activate + Activate with: source .venv/bin/activate "### ); @@ -375,7 +375,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtualenv at: [VENV]/ - Activate with: source [VENV]/bin/activate + Activate with: source .venv/bin/activate "### ); @@ -444,7 +444,7 @@ fn virtualenv_compatibility() { warning: virtualenv's `--clear` has no effect (uv always clears the virtual environment). Using Python 3.12.[X] interpreter at: [PYTHON-3.12] Creating virtualenv at: [VENV]/ - Activate with: source [VENV]/bin/activate + Activate with: source .venv/bin/activate "### ); diff --git a/crates/uv/tests/workspace.rs b/crates/uv/tests/workspace.rs index c7f84439d2ec..3722473e7ea1 100644 --- a/crates/uv/tests/workspace.rs +++ b/crates/uv/tests/workspace.rs @@ -419,7 +419,7 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON] - Creating virtualenv at: [VENV]/ + Creating virtualenv at: .venv Resolved 8 packages in [TIME] Downloaded 5 packages in [TIME] Installed 5 packages in [TIME] @@ -479,7 +479,7 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON] - Creating virtualenv at: [VENV]/ + Creating virtualenv at: .venv Resolved 8 packages in [TIME] Downloaded 5 packages in [TIME] Installed 5 packages in [TIME]