MCPcopy Create free account
hub / github.com/pybind/pybind11 / pytest_assertrepr_compare

Function pytest_assertrepr_compare

tests/conftest.py:205–209  ·  view source on GitHub ↗

Hook to insert custom failure explanation

(op, left, right)

Source from the content-addressed store, hash-verified

203
204
205def pytest_assertrepr_compare(op, left, right): # noqa: ARG001
206 """Hook to insert custom failure explanation"""
207 if hasattr(left, "explanation"):
208 return left.explanation
209 return None
210
211
212# Number of times we think repeatedly collecting garbage might do anything.

Callers

nothing calls this directly

Calls 1

hasattrFunction · 0.85

Tested by

no test coverage detected