Repository navigation
Document async stub call and await tracking - #627
Merged
nicoddemus merged 3 commits intoOct 17, 2026
Merged
Conversation
Clarify that the mock records calls (assertions only check them), document call and await tracking in the async_stub docstring, and link the changelog entry to pytest-dev#627. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicoddemus
force-pushed
the
docs/async-stub-awaits-20261012-r2
branch
from
October 17, 2026 14:19
b6aa258 to
1b9cc42
Compare
Member
|
Thanks! |
Merged
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.
The stub documentation only briefly mentions
async_stub. A call is recorded even if its coroutine is never awaited, so checkingcalledalone can miss an incorrectly invoked async callback.Add a complete example that checks both invocation and awaiting, and explain when to use
assert_awaited_once_with/await_count. Refs #374; the existing AsyncMock behavior is retained.Validation: the documented pytest-asyncio example runs successfully; the HTML documentation builds with warnings treated as errors; applicable pre-commit checks pass.
Prepared with OpenAI Codex (GPT-6.1 Sol, xhigh), including this description.