-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-105522: Correctly handle possible exceptions in Enum
creation in test_enum
#105523
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
Conversation
…tion handling" This reverts commit 9c3951c.
test_enum
by removing extra exception handlingEnum
creation in test_enum
Here's how a potential exception looks like:
And here's how it looks if there are multiple exceptions:
|
@ethanfurman friendly ping :) |
@ethanfurman friendly ping (x2) 😄 |
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.
One minor change and it looks good!
Lib/test/test_enum.py
Outdated
@@ -38,6 +38,25 @@ def load_tests(loader, tests, ignore): | |||
)) | |||
return tests | |||
|
|||
def reraise_enum_exceptions(*enum_types_or_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.
def reraise_enum_exceptions(*enum_types_or_exceptions): | |
def reraise_if_not_enum(*enum_types_or_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.
Done! 👍
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again |
Thanks for making the requested changes! @ethanfurman: please review the changes made to this pull request. |
This is simplier now! 🎉
test_enum
by removing unused exception handling #105522