Skip to content

unittest.doModuleCleanups() swallows all but first exception #134565

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

Closed
serhiy-storchaka opened this issue May 23, 2025 · 0 comments
Closed

unittest.doModuleCleanups() swallows all but first exception #134565

serhiy-storchaka opened this issue May 23, 2025 · 0 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented May 23, 2025

Feature or enhancement

Currently, unittest.doModuleCleanups() swallows all but first exception raised in the cleanup code. With ExceptionGroup we can handle multiple exceptions.

Linked PRs

@serhiy-storchaka serhiy-storchaka self-assigned this May 23, 2025
@serhiy-storchaka serhiy-storchaka added type-feature A feature request or enhancement 3.15 new features, bugs and security fixes labels May 23, 2025
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 23, 2025
@serhiy-storchaka serhiy-storchaka changed the title unittest.doModuleCleanup() swallows all but first exception unittest.doModuleCleanups() swallows all but first exception May 23, 2025
@picnixz picnixz added stdlib Python modules in the Lib dir and removed 3.15 new features, bugs and security fixes labels May 23, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Unittest issues May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
Status: Done
Development

No branches or pull requests

2 participants