Skip to content

Commit

Permalink
uv/tests: tweak cache clean all test
Browse files Browse the repository at this point in the history
The test asserts that 28 files were removed. But on my system, 27 files
are removed.

This PR is first about debugging what the difference is (since CI
presumably passes with the status quo snapshot). And then I'm thinking
the right way to fix the test failure is with a filter that replaces the
specific number of files removed (limited to what we know to be
correct) with a placeholder.
  • Loading branch information
BurntSushi committed Jul 24, 2024
1 parent 9c9510c commit ac614ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/uv/tests/cache_clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ fn clean_all() -> Result<()> {
.assert()
.success();

uv_snapshot!(context.filters(), context.clean().arg("--verbose"), @r###"
uv_snapshot!(context.with_filtered_counts().filters(), context.clean().arg("--verbose"), @r###"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
DEBUG uv [VERSION] ([COMMIT] DATE)
Clearing cache at: [CACHE_DIR]/
Removed 28 files ([SIZE])
Removed [N] files ([SIZE])
"###);

Ok(())
Expand Down

0 comments on commit ac614ee

Please sign in to comment.