]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28873)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 12 Oct 2021 07:18:43 +0000 (00:18 -0700)
committerGitHub <noreply@github.com>
Tue, 12 Oct 2021 07:18:43 +0000 (10:18 +0300)
(cherry picked from commit 15188b115a2da815556053372c912a81a74be43b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_logging.py

index 8202879df067cee5d82c4566f9af377eda7ff107..876c91f64eb7c3d9031fbac1166932b4898df71b 100644 (file)
@@ -5174,6 +5174,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):