summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_contextlib_async.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_contextlib_async.py')
-rw-r--r--Lib/test/test_contextlib_async.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_contextlib_async.py b/Lib/test/test_contextlib_async.py
index 879ddbe..355955f 100644
--- a/Lib/test/test_contextlib_async.py
+++ b/Lib/test/test_contextlib_async.py
@@ -18,7 +18,7 @@ def _async_test(func):
return loop.run_until_complete(coro)
finally:
loop.close()
- asyncio.set_event_loop(None)
+ asyncio.set_event_loop_policy(None)
return wrapper
@@ -295,6 +295,7 @@ class TestAsyncExitStack(TestBaseExitStack, unittest.TestCase):
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(self.loop)
self.addCleanup(self.loop.close)
+ self.addCleanup(asyncio.set_event_loop_policy, None)
@_async_test
async def test_async_callback(self):