Open
Description
-
a detailed description of the bug or problem you are having
the documentation forpytest_assertrepr_compare
states that this hook is only called when an assertion fails. however if apytest_assertion_pass
hook is present, then thepytest_assertrepr_compare
hook also gets called when the assertion passes.not sure if it's intentional or not, but if it is, this behavior should be mentioned in the docs
-
output of
pip list
from the virtual environment you are using
not using pip -
pytest and operating system versions
pytest 8.1.0, windows 10 & 11 -
minimal example if possible
# conftest.py def pytest_assertrepr_compare(): raise Exception # this gets called even though the assertion passed def pytest_assertion_pass(): pass
# test_foo.py def test_foo(): assert 0 == 0