Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/12062.improvement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarified that :func:`pytest_assertrepr_compare <_pytest.hookspec.pytest_assertrepr_compare>` is also invoked for passing assertions when :confval:`enable_assertion_pass_hook` is enabled.
3 changes: 3 additions & 0 deletions src/_pytest/hookspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,9 @@ def pytest_assertrepr_compare(
*in* a string will be escaped. Note that all but the first line will
be indented slightly, the intention is for the first line to be a summary.

If the :confval:`enable_assertion_pass_hook` configuration option is enabled,
this hook is also called for passing assertions.

:param config: The pytest config object.
:param op: The operator, e.g. `"=="`, `"!="`, `"not in"`.
:param left: The left operand.
Expand Down
Loading