File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,10 @@ async def enterAsyncContext(self, cm):
7979 return result
8080
8181 def _callSetUp (self ):
82+ # Force loop to be initialized and set as the current loop
83+ # so that setUp functions can use get_event_loop() and get the
84+ # correct loop instance.
85+ self ._asyncioRunner .get_loop ()
8286 self ._asyncioTestContext .run (self .setUp )
8387 self ._callAsync (self .asyncSetUp )
8488
@@ -116,10 +120,6 @@ def _setupAsyncioRunner(self):
116120 assert self ._asyncioRunner is None , 'asyncio runner is already initialized'
117121 runner = asyncio .Runner (debug = True )
118122 self ._asyncioRunner = runner
119- # Force loop to be initialized and set as the current loop
120- # so that setUp functions can use get_event_loop() and get the
121- # correct loop instance.
122- runner .get_loop ()
123123
124124 def _tearDownAsyncioRunner (self ):
125125 runner = self ._asyncioRunner
You can’t perform that action at this time.
0 commit comments