Skip to content

Commit 77595d3

Browse files
committed
fix(tests): compare library roots by canonical display path
Update model_library::library::tests::test_library_creation to compare canonical display-path strings rather than raw PathBuf equality. This reuses the existing projection canonicalization helper so the assertion stays stable across macOS path aliases, Windows verbatim prefixes, and Windows 8.3 short-name paths exposed by CI temp directories. Verified with cargo test -p pumas-library --manifest-path rust/Cargo.toml model_library::library::tests::test_library_creation and cargo test -p pumas-library --manifest-path rust/Cargo.toml --lib.
1 parent a012ef8 commit 77595d3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • rust/crates/pumas-core/src/model_library

rust/crates/pumas-core/src/model_library/library.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4736,8 +4736,9 @@ mod tests {
47364736
#[tokio::test]
47374737
async fn test_library_creation() {
47384738
let (temp_dir, library) = setup_library().await;
4739-
let expected_root = temp_dir.path().canonicalize().unwrap();
4740-
assert_eq!(library.library_root(), expected_root);
4739+
let actual_root = canonicalize_display_path(&library.library_root().display().to_string());
4740+
let expected_root = canonicalize_display_path(&temp_dir.path().display().to_string());
4741+
assert_eq!(actual_root, expected_root);
47414742
assert!(library.db_path().exists());
47424743
}
47434744

0 commit comments

Comments
 (0)