File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6617,6 +6617,7 @@ def test_rollover(self):
66176617
66186618 @unittest .skipUnless (support .has_st_birthtime ,
66196619 "st_birthtime not available or supported by Python on this OS" )
6620+ @support .requires_resource ('walltime' )
66206621 def test_rollover_based_on_st_birthtime_only (self ):
66216622 def add_record (message : str ) -> None :
66226623 fh = logging .handlers .TimedRotatingFileHandler (
@@ -6639,11 +6640,11 @@ def add_record(message: str) -> None:
66396640
66406641 # At this point, the log file should be rotated if the rotation
66416642 # is based on creation time but should be not if it's based on
6642- # creation time.
6643+ # modification time.
66436644 found = False
66446645 now = datetime .datetime .now ()
66456646 GO_BACK = 5 # seconds
6646- for secs in range (GO_BACK ):
6647+ for secs in range (GO_BACK + 1 ):
66476648 prev = now - datetime .timedelta (seconds = secs )
66486649 fn = self .fn + prev .strftime (".%Y-%m-%d_%H-%M-%S" )
66496650 found = os .path .exists (fn )
You can’t perform that action at this time.
0 commit comments