aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_tasks.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-06-07 01:13:48 +0200
committerGitHub <noreply@github.com>2018-06-07 01:13:48 +0200
commit7ed61e9431ee2c191aeeeb26f86a71bb90ab99fd (patch)
tree762334f6a92749f7daddcc0112fbc606e3980225 /Lib/test/test_asyncio/test_tasks.py
parent0eba7c39132614a5730cda6b340e18dfb2d30d14 (diff)
downloadcpython-7ed61e9431ee2c191aeeeb26f86a71bb90ab99fd.tar.gz
cpython-7ed61e9431ee2c191aeeeb26f86a71bb90ab99fd.zip
bpo-33789, test_asyncio: Hide PendingDeprecationWarning (GH-7461)
Hide PendingDeprecationWarning in test__register_task_3().
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 1c1a0ac01f5..1079d49a402 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2613,7 +2613,8 @@ class BaseTaskIntrospectionTests:
self.assertEqual(asyncio.all_tasks(loop), set())
self._register_task(task)
self.assertEqual(asyncio.all_tasks(loop), set())
- self.assertEqual(asyncio.Task.all_tasks(loop), {task})
+ with self.assertWarns(PendingDeprecationWarning):
+ self.assertEqual(asyncio.Task.all_tasks(loop), {task})
self._unregister_task(task)
def test__enter_task(self):