Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-134565: Use ExceptionGroup to handle multiple errors in unittest.doModuleCleanups()#134566
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
…test.doModuleCleanup()
raiseexceptions[0] | ||
iflen(exceptions)==1andnotisinstance(exceptions[0],ExceptionGroup): | ||
raiseexceptions[0] | ||
raiseExceptionGroup('module cleanup failed',exceptions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this should consistently raiseExceptionGroup('module cleanup failed', exceptions)
, even whenlen(exceptions) == 1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done. But this changed outcome of some existing tests.
…eanups-multiple-errors' into unittest-doModuleCleanups-multiple-errors
Uh oh!
There was an error while loading.Please reload this page.