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

[red-knot] Fix tests in release builds #12022

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Jun 25, 2024

Summary

This PR fixes the red-knot tests when run in release mode.

The problem was that the semantic indexer code contained code with side effects inside of debug_assert_eq calls, that get stripped (entirely)
from release builds, removing the side effects.

This PR moves the side-effects out from the debug_assert_eq calls.

Fixes #12018

Test Plan

cargo test -p red_knot --release

@MichaReiser MichaReiser requested a review from carljm as a code owner June 25, 2024 06:30
@MichaReiser MichaReiser added the red-knot Multi-file analysis & type inference label Jun 25, 2024
@MichaReiser MichaReiser enabled auto-merge (squash) June 25, 2024 06:30
@MichaReiser MichaReiser merged commit 692309e into main Jun 25, 2024
17 checks passed
@MichaReiser MichaReiser deleted the fix-red-knot-tests-in-release branch June 25, 2024 06:34
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@carljm
Copy link
Contributor

carljm commented Jun 25, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests fail when upgrading from ruff 0.4.8 to 0.4.10
2 participants