[Python-checkins] bpo-33789, test_asyncio: Hide PendingDeprecationWarning (GH-7461)
Victor Stinner
webhook-mailer at python.org
Wed Jun 6 19:13:50 EDT 2018
https://github.com/python/cpython/commit/7ed61e9431ee2c191aeeeb26f86a71bb90ab99fd
commit: 7ed61e9431ee2c191aeeeb26f86a71bb90ab99fd
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-06-07T01:13:48+02:00
summary:
bpo-33789, test_asyncio: Hide PendingDeprecationWarning (GH-7461)
Hide PendingDeprecationWarning in test__register_task_3().
files:
M Lib/test/test_asyncio/test_tasks.py
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 1c1a0ac01f5c..1079d49a4021 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2613,7 +2613,8 @@ def done(self):
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):
More information about the Python-checkins
mailing list