File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1904,6 +1904,9 @@ async def agenfn():
19041904        gc_collect ()  # does not warn unawaited 
19051905
19061906
1907+ _asyncio_run  =  functools .partial (asyncio .run , loop_factory = asyncio .EventLoop )
1908+ 
1909+ 
19071910@requires_working_socket () 
19081911class  AsyncGenAsyncioRunTestCase (unittest .TestCase ):
19091912    def  test_async_gen_asyncio_shutdown_02 (self ):
@@ -1924,7 +1927,7 @@ async def main():
19241927            async  for  i  in  it :
19251928                break 
19261929
1927-         asyncio . run (main ())
1930+         _asyncio_run (main ())
19281931
19291932        self .assertEqual (messages , [])
19301933
@@ -1949,7 +1952,7 @@ async def main():
19491952            async  for  i  in  it :
19501953                break 
19511954
1952-         asyncio . run (main ())
1955+         _asyncio_run (main ())
19531956
19541957        message , =  messages 
19551958        self .assertEqual (message ['asyncgen' ], it )
@@ -1978,7 +1981,7 @@ async def main():
19781981                break 
19791982            gc_collect ()
19801983
1981-         asyncio . run (main ())
1984+         _asyncio_run (main ())
19821985
19831986        message , =  messages 
19841987        self .assertIsInstance (message ['exception' ], ZeroDivisionError )
@@ -2005,7 +2008,7 @@ async def main():
20052008            async  for  i  in  async_iterate ():
20062009                break 
20072010
2008-         asyncio . run (main ())
2011+         _asyncio_run (main ())
20092012
20102013        self .assertEqual ([], messages )
20112014        gc_collect ()
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments