]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-84649: Fix unstable test_rollover_at_midnight (GH-154463)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 22 Jul 2026 10:35:42 +0000 (13:35 +0300)
committerGitHub <noreply@github.com>
Wed, 22 Jul 2026 10:35:42 +0000 (10:35 +0000)
commit7dc920a5da4d519b2ce47d2598846762e78f979f
tree4531c9607cb1673513596650c3a62589651a2f59
parentd1174a48ea8fda8bd0057f10e9776ec148276100
gh-84649: Fix unstable test_rollover_at_midnight (GH-154463)

Create the log file in a fresh directory under a name which has never
been used.  On Windows, NTFS file tunneling restored the original
creation time of a file recreated with the same name, which made the
rollover time earlier than the current time and caused an unwanted
rollover.

Also check that the rollover does not happen before the specified time.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/test/test_logging.py