Skip to content

test_remember_date_into_matches_remember_date_with_tz flakes across a minute boundary #794

Closed

Description

@fdaviddpt

main went red at bb71467 (the #790 merge) on one leg only, pytest (macos-latest, 3.9), job 108405447527:

test_remember_date_into_matches_remember_date_with_tz
AssertionError: {'NEW': '2026-09-26 12:40 UTC', 'OLD': '2026-09-26 12:39 UTC'}

The test reads the clock twice: OLD=$(_remember_date "+%Y-%m-%d %H:%M %Z"), then _remember_date_into NEW .... It asserts the two minute-resolution strings are equal. If the two reads fall on either side of a minute boundary, they differ even though both functions are correct. The macOS 3.9 leg is the slowest (12 min), and the subshell fork on bash 3.2 widens the gap. Unrelated to #790, which touched the compact-mode deferred list.

Fix: take a third read after NEW (OLD2) and assert NEW in (OLD, OLD2), or pin the clock the way other lib-clock tests do. The assertion must stay exact. Only the race goes.

[AI-generated]

Activity

  1. added
    priority:low
    filed-by-loop
    lane-diagnostics
    on Sep 26, 2026
  2. self-assigned this
    on Sep 26, 2026
  3. added a commit that references this issue on Sep 26, 2026
  4. removed their assignment
    on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    filed-by-looplane-diagnosticspriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions