@@ -2588,9 +2588,7 @@ def test_event_loop_policy(self):
25882588 def test_get_event_loop (self ):
25892589 policy = asyncio .DefaultEventLoopPolicy ()
25902590 self .assertIsNone (policy ._local ._loop )
2591- with self .assertWarns (DeprecationWarning ) as cm :
2592- loop = policy .get_event_loop ()
2593- self .assertEqual (cm .filename , __file__ )
2591+ loop = policy .get_event_loop ()
25942592 self .assertIsInstance (loop , asyncio .AbstractEventLoop )
25952593
25962594 self .assertIs (policy ._local ._loop , loop )
@@ -2604,10 +2602,8 @@ def test_get_event_loop_calls_set_event_loop(self):
26042602 policy , "set_event_loop" ,
26052603 wraps = policy .set_event_loop ) as m_set_event_loop :
26062604
2607- with self .assertWarns (DeprecationWarning ) as cm :
2608- loop = policy .get_event_loop ()
2605+ loop = policy .get_event_loop ()
26092606 self .addCleanup (loop .close )
2610- self .assertEqual (cm .filename , __file__ )
26112607
26122608 # policy._local._loop must be set through .set_event_loop()
26132609 # (the unix DefaultEventLoopPolicy needs this call to attach
@@ -2796,10 +2792,8 @@ def test_get_event_loop_returns_running_loop2(self):
27962792 loop = asyncio .new_event_loop ()
27972793 self .addCleanup (loop .close )
27982794
2799- with self .assertWarns (DeprecationWarning ) as cm :
2800- loop2 = asyncio .get_event_loop ()
2795+ loop2 = asyncio .get_event_loop ()
28012796 self .addCleanup (loop2 .close )
2802- self .assertEqual (cm .filename , __file__ )
28032797 asyncio .set_event_loop (None )
28042798 with self .assertRaisesRegex (RuntimeError , 'no current' ):
28052799 asyncio .get_event_loop ()
0 commit comments