Skip to content
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

[Minor] Improve the style of some tests in crates/ruff/tests/format.rs #10132

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Feb 26, 2024

While #9599 was being reviewed, @zanieb taught me about the useful insta::with_settings technique you can use to dynamically insert some content into an insta_cmd snapshot. I thought I had switched all my tests in that PR to use insta::with_settings in 7739440, but looking back, I only fixed the tests I added in crates/ruff/tests/lint.rs. As a result, we now have some tests in crates/ruff/tests/format.rs that use raw assert_eq calls, which lead to less informative tracebacks when the test fails. This PR fixes that.

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@AlexWaygood AlexWaygood merged commit 14fa1c5 into astral-sh:main Feb 26, 2024
17 checks passed
@AlexWaygood AlexWaygood deleted the test-style branch February 26, 2024 11:02
@MichaReiser
Copy link
Member

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants