Repository navigation
Store a timing.Duration in CallInfo - #15298
Merged
RonnyPfannschmidt merged 1 commit intoOct 30, 2026
Merged
Conversation
CallInfo keeps the measured timing.Duration; start, stop and duration are properties derived from it (still assignable, as plugins such as pytest-asyncio-cooperative set them). All construction sites measure with _pytest.timing. Subtests used time.time()/time.perf_counter() directly, so a test mocking time under subtests.test() got negative or bogus durations. unittest subtests, which come without timing, use the named timing.UNMEASURED (zeros, as before). Fixes pytest-dev#15201. Co-Authored-By: Claude Opus 5.5 via Claude Code <noreply@anthropic.com>
Member
Author
|
@bluetech i think we need to iterate a bit on authorship/review we want to see i have been pushing driving a claude project from my phone to deal with reviews/issues recently - and i might have slightly overdone it i'd like to align it a bit so i can make use of the agent from mobile as its quite a time safer to run those things quicky |
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.
CallInfo keeps the measured timing.Duration; start, stop and duration are properties derived from it (still assignable, as plugins such as pytest-asyncio-cooperative set them).
All construction sites measure with _pytest.timing. Subtests used time.time()/time.perf_counter() directly, so a test mocking time under subtests.test() got negative or bogus durations. unittest subtests, which come without timing, use the named timing.UNMEASURED (zeros, as before).
Fixes #15201