-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-112186: Improve test case test_loop_is_closed_resource_warnings
#112187
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
gh-112186: Improve test case test_loop_is_closed_resource_warnings
#112187
Conversation
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.
This is a semantic change. The old code allows an exception; the replacement requires one and will fail if something is improved to avoid it. Do you really want this. If not, I would add a note that it would be OK to prevent the exception and remove the assert.
Minor nit: I think the comment fits better under the assert, after the object 'this' points to.
No. I just currently can not prevent
Thanks. It can be removed if there is no |
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.
LG, but I like to indent the comment.
Thanks @dpr-0 for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry, @dpr-0 and @gvanrossum, I could not cleanly backport this to
|
…ings` (pythonGH-112187) (cherry picked from commit 18c6929) Co-authored-by: DPR <dpr-0xff@pm.me>
GH-112255 is a backport of this pull request to the 3.12 branch. |
…ings` (python#112187) (cherry picked from commit 18c6929)
GH-112261 is a backport of this pull request to the 3.11 branch. |
Use
self.assertRaise
insteadtest_loop_is_closed_resource_warnings
#112186