Skip to content

Commit 7ed61e9

Browse files
authored
bpo-33789, test_asyncio: Hide PendingDeprecationWarning (GH-7461)
Hide PendingDeprecationWarning in test__register_task_3().
1 parent 0eba7c3 commit 7ed61e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_asyncio/test_tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2613,7 +2613,8 @@ def done(self):
26132613
self.assertEqual(asyncio.all_tasks(loop), set())
26142614
self._register_task(task)
26152615
self.assertEqual(asyncio.all_tasks(loop), set())
2616-
self.assertEqual(asyncio.Task.all_tasks(loop), {task})
2616+
with self.assertWarns(PendingDeprecationWarning):
2617+
self.assertEqual(asyncio.Task.all_tasks(loop), {task})
26172618
self._unregister_task(task)
26182619

26192620
def test__enter_task(self):

0 commit comments

Comments
 (0)