summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-11-07 19:01:14 -0500
committerYury Selivanov <yury@magic.io>2016-11-07 19:01:14 -0500
commit9aa846bcab8dcb0dac2782ad45fc42b810683b44 (patch)
tree52f65e97e2daff9d1e0cd0f974a61a65ca232b7b /Lib/test/test_asyncio
parent0d5765ed985e50eb544728c8ba47ee2d4ad49d42 (diff)
parent70d1add871b45e7c2b7e0f024370e61e55f64db4 (diff)
downloadcpython-9aa846bcab8dcb0dac2782ad45fc42b810683b44.tar.gz
Merge 3.5 (issue #28613)
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_events.py4
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 4c18300bab..d6489d5f8d 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()