[Python-checkins] bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28873)

serhiy-storchaka webhook-mailer at python.org
Tue Oct 12 03:18:47 EDT 2021


https://github.com/python/cpython/commit/faa87f7f3b60f79b9018aaef0efa5e00d82b817b
commit: faa87f7f3b60f79b9018aaef0efa5e00d82b817b
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2021-10-12T10:18:43+03:00
summary:

bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28873)

(cherry picked from commit 15188b115a2da815556053372c912a81a74be43b)

Co-authored-by: Serhiy Storchaka <storchaka at gmail.com>

files:
M Lib/test/test_logging.py

diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 8202879df067c..876c91f64eb7c 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -5174,6 +5174,7 @@ def test_should_not_rollover(self):
         time.sleep(1.1)    # a little over a second ...
         r = logging.makeLogRecord({'msg': 'testing - device file'})
         self.assertFalse(fh.shouldRollover(r))
+        fh.close()
 
     # other test methods added below
     def test_rollover(self):



More information about the Python-checkins mailing list