[Python-checkins] bpo-40115: Fix refleak in test_asyncio.test_run_in_executor_cancel() (GH-19282)
Kyle Stanley
webhook-mailer at python.org
Wed Apr 1 22:46:53 EDT 2020
https://github.com/python/cpython/commit/8ec7cb53f0705509bac20c96d19fdbd9baec0cb2
commit: 8ec7cb53f0705509bac20c96d19fdbd9baec0cb2
branch: master
author: Kyle Stanley <aeros167 at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-04-02T04:46:44+02:00
summary:
bpo-40115: Fix refleak in test_asyncio.test_run_in_executor_cancel() (GH-19282)
Call explicitly self.loop.shutdown_default_executor().
files:
M Lib/test/test_asyncio/test_events.py
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 4bdf82ef175a0..1f71c1f0979e0 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
More information about the Python-checkins
mailing list