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

fixtures: use exception group when multiple finalizers raise in fixture teardown #12048

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

bluetech
Copy link
Member

@bluetech bluetech commented Mar 2, 2024

Fix #12047.

Previously, if more than one fixture finalizer raised, only the first was reported, and the other errors were lost.

Use an exception group to report them all. This is similar to the change we made in node teardowns (in SetupState).

…re teardown

Previously, if more than one fixture finalizer raised, only the first
was reported, and the other errors were lost.

Use an exception group to report them all. This is similar to the change
we made in node teardowns (in `SetupState`).
@bluetech bluetech force-pushed the fixture-teardown-excgroup branch from 0255b8d to 434282e Compare March 2, 2024 21:39
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.

LGTM!

@bluetech bluetech merged commit f4e1025 into pytest-dev:main Mar 3, 2024
24 checks passed
@bluetech bluetech deleted the fixture-teardown-excgroup branch March 3, 2024 13:09
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.

When multiple fixture finalizers raise, only first exception is reported
2 participants