Return explanation for comparisons in failing assert expressions. Return None for no custom explanation, otherwise return a list of strings. The strings will be joined by newlines but any newlines *in* a string will be escaped. Note that all but the first line will be indented sligh
(
config: "Config", op: str, left: object, right: object
)
| 627 | |
| 628 | |
| 629 | def pytest_assertrepr_compare( |
| 630 | config: "Config", op: str, left: object, right: object |
| 631 | ) -> Optional[List[str]]: |
| 632 | """Return explanation for comparisons in failing assert expressions. |
| 633 | |
| 634 | Return None for no custom explanation, otherwise return a list |
| 635 | of strings. The strings will be joined by newlines but any newlines |
| 636 | *in* a string will be escaped. Note that all but the first line will |
| 637 | be indented slightly, the intention is for the first line to be a summary. |
| 638 | |
| 639 | :param pytest.Config config: The pytest config object. |
| 640 | """ |
| 641 | |
| 642 | |
| 643 | def pytest_assertion_pass(item: "Item", lineno: int, orig: str, expl: str) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected