@@ -2930,11 +2930,16 @@ class GetEventLoopTestsMixin:
29302930    get_running_loop_impl  =  None 
29312931    get_event_loop_impl  =  None 
29322932
2933+     Task  =  None 
2934+     Future  =  None 
2935+ 
29332936    def  setUp (self ):
29342937        self ._get_running_loop_saved  =  events ._get_running_loop 
29352938        self ._set_running_loop_saved  =  events ._set_running_loop 
29362939        self .get_running_loop_saved  =  events .get_running_loop 
29372940        self .get_event_loop_saved  =  events .get_event_loop 
2941+         self ._Task_saved  =  asyncio .Task 
2942+         self ._Future_saved  =  asyncio .Future 
29382943
29392944        events ._get_running_loop  =  type (self )._get_running_loop_impl 
29402945        events ._set_running_loop  =  type (self )._set_running_loop_impl 
@@ -2946,6 +2951,8 @@ def setUp(self):
29462951        asyncio .get_running_loop  =  type (self ).get_running_loop_impl 
29472952        asyncio .get_event_loop  =  type (self ).get_event_loop_impl 
29482953
2954+         asyncio .Task  =  asyncio .tasks .Task  =  type (self ).Task 
2955+         asyncio .Future  =  asyncio .futures .Future  =  type (self ).Future 
29492956        super ().setUp ()
29502957
29512958        self .loop  =  asyncio .new_event_loop ()
@@ -2968,8 +2975,10 @@ def tearDown(self):
29682975            asyncio .get_running_loop  =  self .get_running_loop_saved 
29692976            asyncio .get_event_loop  =  self .get_event_loop_saved 
29702977
2978+             asyncio .Task  =  asyncio .tasks .Task  =  self ._Task_saved 
2979+             asyncio .Future  =  asyncio .futures .Future  =  self ._Future_saved 
2980+ 
29712981    if  sys .platform  !=  'win32' :
2972-         @unittest .skip ("skip" ) 
29732982        def  test_get_event_loop_new_process (self ):
29742983            # bpo-32126: The multiprocessing module used by 
29752984            # ProcessPoolExecutor is not functional when the 
@@ -2995,7 +3004,6 @@ async def main():
29953004                self .loop .run_until_complete (main ()),
29963005                'hello' )
29973006
2998-     @unittest .skip ("skip" ) 
29993007    def  test_get_event_loop_returns_running_loop (self ):
30003008        class  TestError (Exception ):
30013009            pass 
@@ -3043,7 +3051,6 @@ async def func():
30433051
30443052        self .assertIs (asyncio ._get_running_loop (), None )
30453053
3046-     @unittest .skip ("skip" ) 
30473054    def  test_get_event_loop_returns_running_loop2 (self ):
30483055        old_policy  =  asyncio ._get_event_loop_policy ()
30493056        try :
@@ -3090,6 +3097,8 @@ class TestPyGetEventLoop(GetEventLoopTestsMixin, unittest.TestCase):
30903097    get_running_loop_impl  =  events ._py_get_running_loop 
30913098    get_event_loop_impl  =  events ._py_get_event_loop 
30923099
3100+     Task  =  asyncio .tasks ._PyTask 
3101+     Future  =  asyncio .futures ._PyFuture 
30933102
30943103try :
30953104    import  _asyncio   # NoQA 
@@ -3104,6 +3113,8 @@ class TestCGetEventLoop(GetEventLoopTestsMixin, unittest.TestCase):
31043113        get_running_loop_impl  =  events ._c_get_running_loop 
31053114        get_event_loop_impl  =  events ._c_get_event_loop 
31063115
3116+         Task  =  asyncio .tasks ._CTask 
3117+         Future  =  asyncio .futures ._CFuture 
31073118
31083119class  TestServer (unittest .TestCase ):
31093120
0 commit comments