@@ -1634,26 +1634,26 @@ def coro():
16341634 def test_current_task_deprecated (self ):
16351635 Task = self .__class__ .Task
16361636
1637- with self .assertWarns (PendingDeprecationWarning ):
1637+ with self .assertWarns (DeprecationWarning ):
16381638 self .assertIsNone (Task .current_task (loop = self .loop ))
16391639
16401640 async def coro (loop ):
1641- with self .assertWarns (PendingDeprecationWarning ):
1641+ with self .assertWarns (DeprecationWarning ):
16421642 self .assertIs (Task .current_task (loop = loop ), task )
16431643
16441644 # See http://bugs.python.org/issue29271 for details:
16451645 asyncio .set_event_loop (loop )
16461646 try :
1647- with self .assertWarns (PendingDeprecationWarning ):
1647+ with self .assertWarns (DeprecationWarning ):
16481648 self .assertIs (Task .current_task (None ), task )
1649- with self .assertWarns (PendingDeprecationWarning ):
1649+ with self .assertWarns (DeprecationWarning ):
16501650 self .assertIs (Task .current_task (), task )
16511651 finally :
16521652 asyncio .set_event_loop (None )
16531653
16541654 task = self .new_task (self .loop , coro (self .loop ))
16551655 self .loop .run_until_complete (task )
1656- with self .assertWarns (PendingDeprecationWarning ):
1656+ with self .assertWarns (DeprecationWarning ):
16571657 self .assertIsNone (Task .current_task (loop = self .loop ))
16581658
16591659 def test_current_task (self ):
@@ -1982,7 +1982,7 @@ def test_all_tasks_deprecated(self):
19821982 Task = self .__class__ .Task
19831983
19841984 async def coro ():
1985- with self .assertWarns (PendingDeprecationWarning ):
1985+ with self .assertWarns (DeprecationWarning ):
19861986 assert Task .all_tasks (self .loop ) == {t }
19871987
19881988 t = self .new_task (self .loop , coro ())
@@ -2012,9 +2012,9 @@ def kill_me(loop):
20122012 # See http://bugs.python.org/issue29271 for details:
20132013 asyncio .set_event_loop (self .loop )
20142014 try :
2015- with self .assertWarns (PendingDeprecationWarning ):
2015+ with self .assertWarns (DeprecationWarning ):
20162016 self .assertEqual (Task .all_tasks (), {task })
2017- with self .assertWarns (PendingDeprecationWarning ):
2017+ with self .assertWarns (DeprecationWarning ):
20182018 self .assertEqual (Task .all_tasks (None ), {task })
20192019 finally :
20202020 asyncio .set_event_loop (None )
@@ -2692,7 +2692,7 @@ def done(self):
26922692 self .assertEqual (asyncio .all_tasks (loop ), set ())
26932693 self ._register_task (task )
26942694 self .assertEqual (asyncio .all_tasks (loop ), set ())
2695- with self .assertWarns (PendingDeprecationWarning ):
2695+ with self .assertWarns (DeprecationWarning ):
26962696 self .assertEqual (asyncio .Task .all_tasks (loop ), {task })
26972697 self ._unregister_task (task )
26982698
0 commit comments