mirror of
https://github.com/python/cpython.git
synced 2025-07-13 22:35:18 +00:00
[3.11] GH-95736: fix IsolatedAsyncioTestCase to initialize Runner bef… (#96042)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
1b9b4856c8
commit
b68ea2a3e4
3 changed files with 20 additions and 0 deletions
|
@ -79,6 +79,10 @@ class IsolatedAsyncioTestCase(TestCase):
|
|||
return result
|
||||
|
||||
def _callSetUp(self):
|
||||
# Force loop to be initialized and set as the current loop
|
||||
# so that setUp functions can use get_event_loop() and get the
|
||||
# correct loop instance.
|
||||
self._asyncioRunner.get_loop()
|
||||
self._asyncioTestContext.run(self.setUp)
|
||||
self._callAsync(self.asyncSetUp)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue