bpo-33789, test_asyncio: Hide PendingDeprecationWarning (GH-7461)

Hide PendingDeprecationWarning in test__register_task_3().
This commit is contained in:
Victor Stinner 2018-06-07 01:13:48 +02:00 committed by GitHub
parent 0eba7c3913
commit 7ed61e9431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2613,6 +2613,7 @@ class BaseTaskIntrospectionTests:
self.assertEqual(asyncio.all_tasks(loop), set())
self._register_task(task)
self.assertEqual(asyncio.all_tasks(loop), set())
with self.assertWarns(PendingDeprecationWarning):
self.assertEqual(asyncio.Task.all_tasks(loop), {task})
self._unregister_task(task)