From 9a20f8c7b77a5fd289e6662928015bb8c728e9d8 Mon Sep 17 00:00:00 2001 From: konsti Date: Thu, 14 Nov 2024 19:16:20 +0100 Subject: [PATCH] Remove end-of-line whitespace in snapshots (#9127) I've configured my IDE to remove trailing end-of-line whitespace, and these snapshots were causing trouble. --- crates/uv/tests/it/common/mod.rs | 2 ++ crates/uv/tests/it/pip_freeze.rs | 2 +- crates/uv/tests/it/pip_install.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/uv/tests/it/common/mod.rs b/crates/uv/tests/it/common/mod.rs index 2a02636b9..82143317a 100644 --- a/crates/uv/tests/it/common/mod.rs +++ b/crates/uv/tests/it/common/mod.rs @@ -67,6 +67,8 @@ pub const INSTA_FILTERS: &[(&str, &str)] = &[ r"Caused by: .* \(os error 2\)", "Caused by: No such file or directory (os error 2)", ), + // Trim end-of-line whitespaces, to allow removing them on save. + (r"([^\s])[ \t]+(\r?\n)", "$1$2"), ]; /// Create a context for tests which simplifies shared behavior across tests. diff --git a/crates/uv/tests/it/pip_freeze.rs b/crates/uv/tests/it/pip_freeze.rs index 50b637068..a8c618be0 100644 --- a/crates/uv/tests/it/pip_freeze.rs +++ b/crates/uv/tests/it/pip_freeze.rs @@ -80,7 +80,7 @@ fn freeze_duplicate() -> Result<()> { pip==22.1.1 ----- stderr ----- - warning: The package `pip` has multiple installed distributions: + warning: The package `pip` has multiple installed distributions: - [SITE_PACKAGES]/pip-21.3.1.dist-info - [SITE_PACKAGES]/pip-22.1.1.dist-info "### diff --git a/crates/uv/tests/it/pip_install.rs b/crates/uv/tests/it/pip_install.rs index 23565d04f..42d0b0c45 100644 --- a/crates/uv/tests/it/pip_install.rs +++ b/crates/uv/tests/it/pip_install.rs @@ -7300,7 +7300,7 @@ fn sklearn() { [stderr] The 'sklearn' PyPI package is deprecated, use 'scikit-learn' - rather than 'sklearn' for pip commands. + rather than 'sklearn' for pip commands. Here is how to fix this error in the main use cases: - use 'pip install scikit-learn' rather than 'pip install sklearn'