Skip to content

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
@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