Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.4k
[3.10] gh-95010: Fix asyncio GenericWatcherTests.test_create_subprocess_fail…#95099
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…s_fails_with_inactive_watcher (pythonGH-95009)The test was never run, because it was missing the TestCase class.The test failed because the wrong attribute was patched.(cherry picked from commit834bd5d)Co-authored-by: Thomas Grainger <tagrain@gmail.com>
9035b28 to4b59f79CompareThere 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.
Why not just useself.loop.run_until_complete() as in other tests?
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.
theGenericWatcherTests don't have aself.loop, andSubprocessWatcherMixin (which setsself.loop) callsget_event_loop_policy().attach_loop and this test case is testing what happens whenattach_loop isn't called
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.
Many classes setself.loop. For this test you can inherit fromtest_utils.TestCase and add
defsetUp(self):super().setUp()self.loop=asyncio.new_event_loop()self.set_event_loop(self.loop)
4b59f79 toca48762Comparegraingert commentedJul 23, 2022
I think I'll try to hurdle this hurdle when backporting#94184 |
Uh oh!
There was an error while loading.Please reload this page.
…s_with_inactive_watcher (GH-95009)
The test was never run, because it was missing the TestCase class.
The test failed because the wrong attribute was patched.
(cherry picked from commit834bd5d)
Co-authored-by: Thomas Graingertagrain@gmail.com
GenericWatcherTests.test_create_subprocess_fails_with_inactive_watcheris not run #95010