[Minor] Improve the style of some tests in crates/ruff/tests/format.rs
#10132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While #9599 was being reviewed, @zanieb taught me about the useful
insta::with_settings
technique you can use to dynamically insert some content into aninsta_cmd
snapshot. I thought I had switched all my tests in that PR to useinsta::with_settings
in 7739440, but looking back, I only fixed the tests I added incrates/ruff/tests/lint.rs
. As a result, we now have some tests incrates/ruff/tests/format.rs
that use rawassert_eq
calls, which lead to less informative tracebacks when the test fails. This PR fixes that.