From: Victor Stinner Date: Fri, 18 Aug 2017 22:34:00 +0000 (+0200) Subject: bpo-31235: Fix ResourceWarning in test_logging (#3147) X-Git-Tag: v3.7.0a1~249 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7719e27b3cad0f2b86cb932a76cbe55c541b02e;p=thirdparty%2FPython%2Fcpython.git bpo-31235: Fix ResourceWarning in test_logging (#3147) --- diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 226532a9792d..f4aef9f8962f 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -797,6 +797,8 @@ if threading: """ self.close() self._thread.join(timeout) + asyncore.close_all(map=self._map, ignore_all=True) + alive = self._thread.is_alive() self._thread = None if alive: