-
Notifications
You must be signed in to change notification settings - Fork 1.6k
make snapshot test more permissive #13251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
r#""commits_since_last_tag": .*"#, | ||
r#""commits_since_last_tag": [COUNT]"#, | ||
), | ||
// This last filter normalizes output for tarball builds of uv that lack commit info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this test won't really change a lot, should we just check if commit info is available and have two snapshots? Using filters this way makes me a bit uncomfortable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh interesting, i never considered conditional snapshots! that's a great idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're just annoying during snapshot updates, so I try to avoid them in most cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but if the filter is replacing basically the entire expected output, I'd either just skip the test or have a conditional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've filed #13566 doing that.
Gentle ping. Can I do anything to help move this or any other solution forward? |
Fix the two version json tests to account for the possibility that uv was built outside a git checkout (e.g. from an unpacked git archive) and therefore does not have the commit info available. This approach uses separate snapshots for the two cases, as suggested in discussion of pull request astral-sh#13251. Fixes astral-sh#13212
## Summary Fix the two version json tests to account for the possibility that uv was built outside a git checkout (e.g. from an unpacked git archive) and therefore does not have the commit info available. This approach uses separate snapshots for the two cases, as suggested in discussion of pull request #13251. Fixes #13212 ## Test Plan 1. `cargo test` in a git clone. 2. `cargo clean`, moved `.git` away, `cargo test` again. --------- Co-authored-by: Aria Desires <aria.desires@gmail.com>
fixes #13212