[Python-checkins] bpo-31235: Fix ResourceWarning in test_logging (#3147)

Victor Stinner webhook-mailer at python.org
Fri Aug 18 18:34:03 EDT 2017


https://github.com/python/cpython/commit/a7719e27b3cad0f2b86cb932a76cbe55c541b02e
commit: a7719e27b3cad0f2b86cb932a76cbe55c541b02e
branch: master
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-08-19T00:34:00+02:00
summary:

bpo-31235: Fix ResourceWarning in test_logging (#3147)

files:
M Lib/test/test_logging.py

diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 226532a9792..f4aef9f8962 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -797,6 +797,8 @@ def stop(self, timeout=None):
             """
             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:



More information about the Python-checkins mailing list