]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45401: Fix a resource warning in test_logging (GH-28864)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 11 Oct 2021 08:54:44 +0000 (11:54 +0300)
committerGitHub <noreply@github.com>
Mon, 11 Oct 2021 08:54:44 +0000 (11:54 +0300)
Lib/test/test_logging.py

index b5885b985afd317c7b0991db596f6e9dca0d59b1..85b6e5f392111321af46cf6d76dac076664cfe96 100644 (file)
@@ -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):