-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Do not use ZeroDivisionError
in tests for unrelated things
#119989
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
Comments
Specifically, #119066 (review). |
|
To answer my question: I routinely use something like
Others do not:
Regardless, the multiple tests using 'Bad' classs require the long error name. I could be persuaded that defining something like This strikes me as a test style proposal that is plausible but needs discussion on Discord or Discourse before possibly revising PEP8 or Devguide. Serhiy, only a few in test_tkinter:
|
@terryjreedy @sobolevn I apologise for causing unnecessary work and brain cycles here; I think I shouldn't have made the original comment, and definitely shouldn't have used the word "horrified". I do think that this is a (very minor) abuse of |
Feature or enhancement
Refs #119066
Probably, most of them should be converted to some custom exception.
The text was updated successfully, but these errors were encountered: