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
bpo-46299: improve test_descr.py with stricter error handling
#30471
Conversation
Misc/NEWS.d/next/Tests/2022-01-08-01-39-57.bpo-46299.8SsRqA.rst
Outdated
Show resolved
Hide resolved
| @@ -4452,6 +4450,8 @@ def __getattr__(self, attr): | |||
| print("Oops!") | |||
| except RuntimeError: | |||
| pass | |||
| else: | |||
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.
Would you like to update the test by using
from contextlib import redirect_stdout?
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.
Thanks for the idea! But, I went for the smallest diff.
…onGH-30471) (cherry picked from commit e63066c) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
GH-30476 is a backport of this pull request to the 3.9 branch. |
…onGH-30471) (cherry picked from commit e63066c) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
GH-30477 is a backport of this pull request to the 3.10 branch. |
https://bugs.python.org/issue46299