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-46129: Rewrite asyncio.locks tests with IsolatedAsyncioTestCase #30198
Conversation
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
The issue can be backported to 3.9-3.10, it doesn't add backward compatibility issues |
Misc/NEWS.d/next/Library/2021-12-19-10-47-24.bpo-46128.Qv3EK1.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Tests/2021-12-19-12-20-57.bpo-46129.I3MunH.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
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.
LGTM in general, but I have some questions.
self.assertFalse(lock.locked()) | ||
self.assertTrue(ta.done()) | ||
self.assertTrue(tb.cancelled()) | ||
self.assertTrue(tc.done()) | ||
await tc |
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.
It differs from the former code. Why?
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.
Technically the same, but the new version also checks that tc
task was not cancelled.
I can revert if you insist.
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.
If it is the same it LGTM.
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.
@serhiy-storchaka thanks for the review.
Comments are addressed.
self.assertFalse(lock.locked()) | ||
self.assertTrue(ta.done()) | ||
self.assertTrue(tb.cancelled()) | ||
self.assertTrue(tc.done()) | ||
await tc |
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.
Technically the same, but the new version also checks that tc
task was not cancelled.
I can revert if you insist.
self.assertFalse(lock.locked()) | ||
self.assertTrue(ta.done()) | ||
self.assertTrue(tb.cancelled()) | ||
self.assertTrue(tc.done()) | ||
await tc |
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.
If it is the same it LGTM.
Thanks @asvetlov for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
Sorry, @asvetlov, I could not cleanly backport this to |
Sorry @asvetlov, I had trouble checking out the |
…tCase (pythonGH-30198) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>. (cherry picked from commit 9c06fd8) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
GH-30202 is a backport of this pull request to the 3.10 branch. |
GH-30204 is a backport of this pull request to the 3.9 branch. |
…Case (pythonGH-30198) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>. (cherry picked from commit 9c06fd8) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
…ythonGH-30198) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
https://bugs.python.org/issue46129