diff options
author | Yury Selivanov <yury@magic.io> | 2016-10-05 22:29:04 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-10-05 22:29:04 (GMT) |
commit | d2c5fab7c618b8c94b42ff4ae8c1875cc521f09d (patch) | |
tree | 8028fc4f0ca275b347d6f977c32a5a6f2330de2a /Lib/test | |
parent | 139914a0589154aaf0f47ad6725f71e8baf2a6cf (diff) | |
parent | 0de3de6cbfe034654dc03f3808de0c25e28a0c38 (diff) | |
download | cpython-d2c5fab7c618b8c94b42ff4ae8c1875cc521f09d.zip cpython-d2c5fab7c618b8c94b42ff4ae8c1875cc521f09d.tar.gz cpython-d2c5fab7c618b8c94b42ff4ae8c1875cc521f09d.tar.bz2 |
Merge 3.5 (issue #28371)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_asyncio/test_base_events.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index 362ab06..a9aba0f 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -358,7 +358,8 @@ class BaseEventLoopTests(test_utils.TestCase): h = asyncio.Handle(cb, (), self.loop) h.cancel() - f = self.loop.run_in_executor(None, h) + with self.assertWarnsRegex(DeprecationWarning, "Passing Handle"): + f = self.loop.run_in_executor(None, h) self.assertIsInstance(f, asyncio.Future) self.assertTrue(f.done()) self.assertIsNone(f.result()) @@ -373,12 +374,14 @@ class BaseEventLoopTests(test_utils.TestCase): self.loop.set_default_executor(executor) - res = self.loop.run_in_executor(None, h) + with self.assertWarnsRegex(DeprecationWarning, "Passing Handle"): + res = self.loop.run_in_executor(None, h) self.assertIs(f, res) executor = mock.Mock() executor.submit.return_value = f - res = self.loop.run_in_executor(executor, h) + with self.assertWarnsRegex(DeprecationWarning, "Passing Handle"): + res = self.loop.run_in_executor(executor, h) self.assertIs(f, res) self.assertTrue(executor.submit.called) |