Skip to content

docs: clarify pytest_assertrepr_compare behavior with passing assertions#14706

Open
Joosboy wants to merge 2 commits into
pytest-dev:mainfrom
Joosboy:docs/12062-assertion-pass-hook
Open

docs: clarify pytest_assertrepr_compare behavior with passing assertions#14706
Joosboy wants to merge 2 commits into
pytest-dev:mainfrom
Joosboy:docs/12062-assertion-pass-hook

Conversation

@Joosboy

@Joosboy Joosboy commented Jul 14, 2026

Copy link
Copy Markdown

Closes #12062.

When enable_assertion_pass_hook is enabled, pytest_assertrepr_compare is also evaluated on passing assertions. This clarifies the hook's docstring to state this behavior, as previously it only mentioned failing assertions.

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pytest_assertrepr_compare is executed on passing assertions when a pytest_assertion_pass hook is defined

1 participant