Skip to content

Commit 25f512d

Browse files
committed
test: normalize Windows temp paths in Conda regression
Keep the casing assertion independent of CI temp-path short-name behavior.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 940b874 commit 25f512d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎crates/pet-conda/tests/environment_locations_test.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ fn skips_path_lookup_when_conda_executable_provided() {
211211
fn deduplicates_windows_install_aliases_and_preserves_disk_casing() {
212212
use common::create_env_variables;
213213
use pet_conda::environment_locations::get_conda_environment_paths;
214+
use pet_fs::path::norm_case;
214215
use std::fs;
215216

216217
let temp_dir = tempfile::tempdir().expect("failed to create temporary test directory");
@@ -236,13 +237,14 @@ fn deduplicates_windows_install_aliases_and_preserves_disk_casing() {
236237
env.userprofile = Some(home.to_string_lossy().into_owned());
237238

238239
let environments = get_conda_environment_paths(&env, &None);
240+
let normalized_home = norm_case(home);
239241
let mut local_environments = environments
240242
.into_iter()
241-
.filter(|path| path.starts_with(home))
243+
.filter(|path| path.starts_with(&normalized_home))
242244
.collect::<Vec<_>>();
243245
local_environments.sort();
244246

245-
let mut expected = vec![install, child];
247+
let mut expected = vec![norm_case(install), norm_case(child)];
246248
expected.sort();
247249
assert_eq!(local_environments, expected);
248250
}

0 commit comments

Comments
 (0)