bpo-40115: Fix refleak in test_asyncio.test_run_in_executor_cancel() (GH-19282)

Call explicitly self.loop.shutdown_default_executor().
This commit is contained in:
Kyle Stanley 2020-04-01 22:46:44 -04:00 committed by GitHub
parent e7c98f08e2
commit 8ec7cb53f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -365,6 +365,8 @@ class EventLoopTestsMixin:
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