diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-08 00:01:14 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-08 00:01:14 (GMT) |
commit | 1994dd360b052d85be9b02c44f2287468b157c10 (patch) | |
tree | 6ae6aba1c1c8286e6089ae3cc695d36205babcae /Lib/test/test_asyncio | |
parent | 1ec1cd161b351bc42c4b55c0f943fa5f8fe1bb6e (diff) | |
parent | 6ea2b8fc8be8725e1553fbbb159ea07806e9f41a (diff) | |
download | cpython-1994dd360b052d85be9b02c44f2287468b157c10.zip cpython-1994dd360b052d85be9b02c44f2287468b157c10.tar.gz cpython-1994dd360b052d85be9b02c44f2287468b157c10.tar.bz2 |
Merge 3.5 (issue #28613)
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 4c18300..d6489d5 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -2732,9 +2732,11 @@ class PolicyTests(unittest.TestCase): try: asyncio.set_event_loop_policy(Policy()) loop = asyncio.new_event_loop() + self.assertIs(asyncio._get_running_loop(), None) async def func(): self.assertIs(asyncio.get_event_loop(), loop) + self.assertIs(asyncio._get_running_loop(), loop) loop.run_until_complete(func()) finally: @@ -2742,6 +2744,8 @@ class PolicyTests(unittest.TestCase): if loop is not None: loop.close() + self.assertIs(asyncio._get_running_loop(), None) + if __name__ == '__main__': unittest.main() |