diff options
-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']) |