From 7697628ba1c90191a72441b94b174f1c5ee257b4 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 14 Dec 2021 16:46:07 +0000 Subject: [PATCH] bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) (cherry picked from commit 850aefc2c651110a784cd5478af9774b1f6287a3) Co-authored-by: Vinay Sajip --- Lib/test/test_logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 858adc72b46a3c..363ea29d3af2f7 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -5301,7 +5301,8 @@ def test_compute_files_to_delete(self): p = os.path.join(wd, '%s.log' % prefix) rotator = logging.handlers.TimedRotatingFileHandler(p, when='s', interval=5, - backupCount=7) + backupCount=7, + delay=True) rotators.append(rotator) if prefix.startswith('a.b'): for t in times: