[Python-checkins] cpython: Issue #24017: Unset asyncio event loop after test.
yury.selivanov
python-checkins at python.org
Tue May 12 20:28:32 CEST 2015
https://hg.python.org/cpython/rev/9d2c4d887c19
changeset: 95987:9d2c4d887c19
user: Yury Selivanov <yselivanov at sprymix.com>
date: Tue May 12 14:28:08 2015 -0400
summary:
Issue #24017: Unset asyncio event loop after test.
files:
Lib/test/test_coroutines.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -772,13 +772,15 @@
raise MyException
buffer.append('unreachable')
- loop = asyncio.get_event_loop()
+ loop = asyncio.new_event_loop()
+ asyncio.set_event_loop(loop)
try:
loop.run_until_complete(f())
except MyException:
pass
finally:
loop.close()
+ asyncio.set_event_loop(None)
self.assertEqual(buffer, [1, 2, 'MyException'])
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list