Skip to content

Update exception filtering to match against actual exception #293

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

Merged
merged 2 commits into from
May 8, 2025

Conversation

yugokato
Copy link
Contributor

@yugokato yugokato commented Apr 23, 2025

Fixes #292

This PR aims to change this function to check specified only_rerun and rerun_except value(s) against the actual exception, instead of using report.longrepr.reprcrash.message or report.longreprtext.

I wasn't sure why report.longrepr.reprcrash.message and report.longreprtext are currently used. So please disregard/close the PR if my change looks invalid or would break something.

@yugokato yugokato marked this pull request as ready for review April 24, 2025 14:45
Copy link
Contributor

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, could you please add a change log entry describing your change.

@yugokato
Copy link
Contributor Author

LGTM, could you please add a change log entry describing your change.

Thanks, I'll do. Which changelog category should I use for this? I initially thought the original behavior was a bug, but given the test coverage and README note around this, it seems it was an intentional design choice.
Also I'm going to remove this README section as it is no longer valid with my change.

@yugokato
Copy link
Contributor Author

yugokato commented May 1, 2025

@icemac I've added my change log under the "Other Changes" category for now. Please let me know if you prefer a different one.

@icemac icemac enabled auto-merge (squash) May 8, 2025 06:30
@icemac
Copy link
Contributor

icemac commented May 8, 2025

LGTM, enabling automerge.

@icemac icemac merged commit c5a282c into pytest-dev:master May 8, 2025
42 checks passed
@icemac
Copy link
Contributor

icemac commented May 8, 2025

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.

only_rerun="AssertionError" doesn't trigger reruns when AssertionError is raised by built-in assert statement
2 participants