Repository navigation
test: latest_per sibling test no longer ties on a one-second completion stamp - #1759
Merged
Merged
Conversation
…on stamp Status records stamp completion to the second, so the test's two small fits often finished in the same second and latest_per kept either by path. Backdate the first fit's stamp a minute so the second is unambiguously the later. Fixes #1758 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes a flaky test that turned PyAutoFit
mainred at963ff296a(Tests run 41456192737,unittest-nojaxleg) and so blocked the release-validation preflight (closes #1758).test_latest_per_keeps_the_latest_siblingruns two tiny fits back to back and expectsAggregator.latest_per()to keep the second. The status record stamps completion to the second (%Y-%m-%dT%H:%M:%SZ), so both fits often finished "at the same time".latest_perthen broke the tie by path, an identifier hash, and the test passed or failed by chance. It failed 1 of the last 15Testsruns.The fix backdates the first fit's status stamp by one minute after the fits run. Every assertion is kept. The library behaviour is unchanged and correct: an exact tie is resolved deterministically, and real reruns are minutes apart.
API Changes
None (test-only).
Test Plan
test_autofit/results: 58 passed.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code