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

Report class cleanup exceptions #12250

Merged
merged 4 commits into from Apr 27, 2024

Conversation

millerdev
Copy link
Contributor

Fixes #11728

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @millerdev!

I changed the implementation a bit to raise ExceptionGroup instead of printing the tracebacks directly: printing at first glance seems fine, but this will not produce the desired effects (such as with xdist) because it will not go through the reporting protocols expected by plugins.

This unfortunately makes for a longer traceback (which we should improve in #12255), however I think this is the right path for now.

@nicoddemus nicoddemus merged commit 7e7503c into pytest-dev:main Apr 27, 2024
24 checks passed
@millerdev millerdev deleted the report-class-cleanup-exceptions branch April 27, 2024 19:14
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.

Pytest does not show addClassCleanup errors
2 participants