From 93fde8cbb48c3adc814012d22e5c3d7bb597d18e Mon Sep 17 00:00:00 2001 From: Kyle Stanley Date: Wed, 1 Apr 2020 16:30:33 -0400 Subject: [PATCH] Fix refleak in test_asyncio --- Lib/test/test_asyncio/test_events.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 4bdf82ef175a0d..1f71c1f0979e06 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -365,6 +365,8 @@ def run(): f2 = self.loop.run_in_executor(None, run) f2.cancel() + self.loop.run_until_complete( + self.loop.shutdown_default_executor()) self.loop.close() self.loop.call_soon = patched_call_soon self.loop.call_soon_threadsafe = patched_call_soon