Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

test_logging: rotation tests fails on Windows, macOS and FreeBSD #150960

Copy link
Copy link
@vstinner

Description

@vstinner
Issue body actions

Bug report

Example on macOS:

FAIL: test_rollover_based_on_st_birthtime_only (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_based_on_st_birthtime_only)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_logging.py", line 6666, in test_rollover_based_on_st_birthtime_only
    self.assertTrue(found, msg=msg)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: False is not true : No rotated files found, went back 5 seconds

Example on Windows:

FAIL: test_rollover_based_on_st_birthtime_only (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_based_on_st_birthtime_only)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\bbarea\pull_request.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_logging.py", line 6666, in test_rollover_based_on_st_birthtime_only
    self.assertTrue(found, msg=msg)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: False is not true : No rotated files found, went back 5 seconds

Stdout:
Contents of test_logging-2-njcaf5hh.log:
os.stat_result(st_mode=33206, st_ino=116249165381905831, st_dev=5772745545947373322, st_nlink=1, st_uid=0, st_gid=0, st_size=88, st_atime=1780658874, st_mtime=1780658874, st_ctime=1780658869)
2026-06-05 11:27:54,029 testing - new record supposedly in the new file after rollover

Contents of test_logging-2-njcaf5hh.log.2026-06-05_11-27-49:
os.stat_result(st_mode=33206, st_ino=167477611143228771, st_dev=5772745545947373322, st_nlink=1, st_uid=0, st_gid=0, st_size=123, st_atime=1780658871, st_mtime=1780658871, st_ctime=1780658869)
2026-06-05 11:27:49,817 testing - initial
2026-06-05 11:27:51,921 testing - update before rollover to renew the st_mtime


Stderr:
Test time: 2026-06-05 11-27-54
The only matching files are: ['test_logging-2-njcaf5hh.log', 'test_logging-2-njcaf5hh.log.2026-06-05_11-27-49']
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    Status
    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.