diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-12 18:28:08 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-12 18:28:08 (GMT) |
commit | fdba8381ffb02fd888d84cbcd3c5944ee88e72a2 (patch) | |
tree | 089442c939ad2a6d726b0228315888f5bb2b121a /Lib/test/test_coroutines.py | |
parent | 08a7a4e5926392e2d7247bb3536032dc48781280 (diff) | |
download | cpython-fdba8381ffb02fd888d84cbcd3c5944ee88e72a2.zip cpython-fdba8381ffb02fd888d84cbcd3c5944ee88e72a2.tar.gz cpython-fdba8381ffb02fd888d84cbcd3c5944ee88e72a2.tar.bz2 |
Issue #24017: Unset asyncio event loop after test.
Diffstat (limited to 'Lib/test/test_coroutines.py')
-rw-r--r-- | 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 index 2a45225..aa2a5e8 100644 --- a/Lib/test/test_coroutines.py +++ b/Lib/test/test_coroutines.py @@ -772,13 +772,15 @@ class CoroAsyncIOCompatTest(unittest.TestCase): 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']) |