Skip to content

Commit

Permalink
Try to remove canonical filter
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Aug 23, 2024
1 parent a605a55 commit e6565c6
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions crates/uv/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@ impl TestContext {
let home_dir = ChildPath::new(root.path()).child("home");
fs_err::create_dir_all(&home_dir).expect("Failed to create test home directory");

// Canonicalize the temp dir for consistent snapshot behavior
let canonical_temp_dir = temp_dir.canonicalize().unwrap();
let venv = ChildPath::new(canonical_temp_dir.join(".venv"));
let venv = temp_dir.child(".venv");

let python_version = python_versions
.first()
Expand Down Expand Up @@ -321,18 +319,6 @@ impl TestContext {
"Activate with: source .venv/bin/activate".to_string(),
));

// Account for [`Simplified::user_display`] which is relative to the command working directory
if let Some(site_packages) = site_packages {
filters.push((
Self::path_pattern(
site_packages
.strip_prefix(&canonical_temp_dir)
.expect("The test site-packages directory is always in the tempdir"),
),
"[SITE_PACKAGES]/".to_string(),
));
};

// Filter non-deterministic temporary directory names
// Note we apply this _after_ all the full paths to avoid breaking their matching
filters.push((r"(\\|\/)\.tmp.*(\\|\/)".to_string(), "/[TMP]/".to_string()));
Expand Down

0 comments on commit e6565c6

Please sign in to comment.