From: Serhiy Storchaka Date: Mon, 11 Oct 2021 08:54:44 +0000 (+0300) Subject: bpo-45401: Fix a resource warning in test_logging (GH-28864) X-Git-Tag: v3.11.0a2~253 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15188b115a2da815556053372c912a81a74be43b;p=thirdparty%2FPython%2Fcpython.git bpo-45401: Fix a resource warning in test_logging (GH-28864) --- diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index b5885b985afd..85b6e5f39211 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -5324,6 +5324,7 @@ class TimedRotatingFileHandlerTest(BaseFileTest): 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):