MCPcopy Create free account
hub / github.com/pytest-dev/pytest / pytest_exception_interact

Function pytest_exception_interact

src/_pytest/hookspec.py:890–906  ·  view source on GitHub ↗

Called when an exception was raised which can potentially be interactively handled. May be called during collection (see :hook:`pytest_make_collect_report`), in which case ``report`` is a :class:`CollectReport`. May be called during runtest of an item (see :hook:`pytest_runtest_pro

(
    node: Union["Item", "Collector"],
    call: "CallInfo[Any]",
    report: Union["CollectReport", "TestReport"],
)

Source from the content-addressed store, hash-verified

888
889
890def pytest_exception_interact(
891 node: Union["Item", "Collector"],
892 call: "CallInfo[Any]",
893 report: Union["CollectReport", "TestReport"],
894) -> None:
895 """Called when an exception was raised which can potentially be
896 interactively handled.
897
898 May be called during collection (see :hook:`pytest_make_collect_report`),
899 in which case ``report`` is a :class:`CollectReport`.
900
901 May be called during runtest of an item (see :hook:`pytest_runtest_protocol`),
902 in which case ``report`` is a :class:`TestReport`.
903
904 This hook is not called if the exception that was raised is an internal
905 exception like ``skip.Exception``.
906 """
907
908
909def pytest_enter_pdb(config: "Config", pdb: "pdb.Pdb") -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected