@@ -1634,26 +1634,26 @@ def coro():
1634
1634
def test_current_task_deprecated (self ):
1635
1635
Task = self .__class__ .Task
1636
1636
1637
- with self .assertWarns (PendingDeprecationWarning ):
1637
+ with self .assertWarns (DeprecationWarning ):
1638
1638
self .assertIsNone (Task .current_task (loop = self .loop ))
1639
1639
1640
1640
async def coro (loop ):
1641
- with self .assertWarns (PendingDeprecationWarning ):
1641
+ with self .assertWarns (DeprecationWarning ):
1642
1642
self .assertIs (Task .current_task (loop = loop ), task )
1643
1643
1644
1644
# See http://bugs.python.org/issue29271 for details:
1645
1645
asyncio .set_event_loop (loop )
1646
1646
try :
1647
- with self .assertWarns (PendingDeprecationWarning ):
1647
+ with self .assertWarns (DeprecationWarning ):
1648
1648
self .assertIs (Task .current_task (None ), task )
1649
- with self .assertWarns (PendingDeprecationWarning ):
1649
+ with self .assertWarns (DeprecationWarning ):
1650
1650
self .assertIs (Task .current_task (), task )
1651
1651
finally :
1652
1652
asyncio .set_event_loop (None )
1653
1653
1654
1654
task = self .new_task (self .loop , coro (self .loop ))
1655
1655
self .loop .run_until_complete (task )
1656
- with self .assertWarns (PendingDeprecationWarning ):
1656
+ with self .assertWarns (DeprecationWarning ):
1657
1657
self .assertIsNone (Task .current_task (loop = self .loop ))
1658
1658
1659
1659
def test_current_task (self ):
@@ -1982,7 +1982,7 @@ def test_all_tasks_deprecated(self):
1982
1982
Task = self .__class__ .Task
1983
1983
1984
1984
async def coro ():
1985
- with self .assertWarns (PendingDeprecationWarning ):
1985
+ with self .assertWarns (DeprecationWarning ):
1986
1986
assert Task .all_tasks (self .loop ) == {t }
1987
1987
1988
1988
t = self .new_task (self .loop , coro ())
@@ -2012,9 +2012,9 @@ def kill_me(loop):
2012
2012
# See http://bugs.python.org/issue29271 for details:
2013
2013
asyncio .set_event_loop (self .loop )
2014
2014
try :
2015
- with self .assertWarns (PendingDeprecationWarning ):
2015
+ with self .assertWarns (DeprecationWarning ):
2016
2016
self .assertEqual (Task .all_tasks (), {task })
2017
- with self .assertWarns (PendingDeprecationWarning ):
2017
+ with self .assertWarns (DeprecationWarning ):
2018
2018
self .assertEqual (Task .all_tasks (None ), {task })
2019
2019
finally :
2020
2020
asyncio .set_event_loop (None )
@@ -2692,7 +2692,7 @@ def done(self):
2692
2692
self .assertEqual (asyncio .all_tasks (loop ), set ())
2693
2693
self ._register_task (task )
2694
2694
self .assertEqual (asyncio .all_tasks (loop ), set ())
2695
- with self .assertWarns (PendingDeprecationWarning ):
2695
+ with self .assertWarns (DeprecationWarning ):
2696
2696
self .assertEqual (asyncio .Task .all_tasks (loop ), {task })
2697
2697
self ._unregister_task (task )
2698
2698
0 commit comments