Called whenever an assertion passes. .. versionadded:: 5.0 Use this hook to do some processing after a passing assertion. The original assertion information is available in the `orig` string and the pytest introspected assertion information is available in the `expl` string.
(item: "Item", lineno: int, orig: str, expl: str)
| 641 | |
| 642 | |
| 643 | def pytest_assertion_pass(item: "Item", lineno: int, orig: str, expl: str) -> None: |
| 644 | """Called whenever an assertion passes. |
| 645 | |
| 646 | .. versionadded:: 5.0 |
| 647 | |
| 648 | Use this hook to do some processing after a passing assertion. |
| 649 | The original assertion information is available in the `orig` string |
| 650 | and the pytest introspected assertion information is available in the |
| 651 | `expl` string. |
| 652 | |
| 653 | This hook must be explicitly enabled by the ``enable_assertion_pass_hook`` |
| 654 | ini-file option: |
| 655 | |
| 656 | .. code-block:: ini |
| 657 | |
| 658 | [pytest] |
| 659 | enable_assertion_pass_hook=true |
| 660 | |
| 661 | You need to **clean the .pyc** files in your project directory and interpreter libraries |
| 662 | when enabling this option, as assertions will require to be re-written. |
| 663 | |
| 664 | :param pytest.Item item: pytest item object of current test. |
| 665 | :param int lineno: Line number of the assert statement. |
| 666 | :param str orig: String with the original assertion. |
| 667 | :param str expl: String with the assert explanation. |
| 668 | """ |
| 669 | |
| 670 | |
| 671 | # ------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected