-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
bpo-32972: Document IsolatedAsyncioTestCase of unittest module #15878
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
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.
Looks good, thank you.
Please fix a couple notes
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.
import paths should be fixed before the merge
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 |
Thanks Andrew, I didn't know about the import. It makes it more clean and user doesn't need to know about async_case module too. I have fixed the imports as per comments. I think this feature also deserves a better attention so I have added it to the What's new document under unittest section with a simple example. Thoughts? |
Excellent idea! Please do |
Sure, added at https://github.com/python/cpython/pull/15878/files#diff-77c703d9a958f6a4b0dc2f692b3fd5b3R1114 . Please review the wording and example. |
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.
The example is fine. Please address my last comments.
Thanks Andrew, I have reworded Yes, test discovery works better and friendly. I must admit I copied the test from async_case as example which was the reason and I just learned about TestCase instantiation while writing this example :) Your suggestion is better and changed it to test discovery. |
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.
Perfect!
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.
there are two extra lines in example that should be dropped
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 |
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.
Thank you very much!
Done well
Ah sorry, I removed the connection example and overlooked the setup and teardown which is not used. Thanks. |
Thank you very much Andrew for all the guidance :) |
@tirkarthi: Status check is done, and it's a success ✅ . |
Thanks @tirkarthi for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
…nGH-15878) * Document `unittest.IsolatedAsyncioTestCase` API * Add a simple example with respect to order of evaluation of setup and teardown calls. https://bugs.python.org/issue32972 Automerge-Triggered-By: @asvetlov (cherry picked from commit 6a9fd66) Co-authored-by: Xtreak <tir.karthi@gmail.com>
GH-15918 is a backport of this pull request to the 3.8 branch. |
) (GH-15918) * Document `unittest.IsolatedAsyncioTestCase` API * Add a simple example with respect to order of evaluation of setup and teardown calls. https://bugs.python.org/issue32972 Automerge-Triggered-By: @asvetlov (cherry picked from commit 6a9fd66) Co-authored-by: Xtreak <tir.karthi@gmail.com>
…nGH-15878) * Document `unittest.IsolatedAsyncioTestCase` API * Add a simple example with respect to order of evaluation of setup and teardown calls. https://bugs.python.org/issue32972 Automerge-Triggered-By: @asvetlov
…nGH-15878) * Document `unittest.IsolatedAsyncioTestCase` API * Add a simple example with respect to order of evaluation of setup and teardown calls. https://bugs.python.org/issue32972 Automerge-Triggered-By: @asvetlov
unittest.IsolatedAsyncioTestCase
APIhttps://bugs.python.org/issue32972
Automerge-Triggered-By: @asvetlov