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

Function call_and_report

src/_pytest/runner.py:218–228  ·  view source on GitHub ↗
(
    item: Item, when: "Literal['setup', 'call', 'teardown']", log: bool = True, **kwds
)

Source from the content-addressed store, hash-verified

216
217
218def call_and_report(
219 item: Item, when: "Literal['setup', 'call', 'teardown']", log: bool = True, **kwds
220) -> TestReport:
221 call = call_runtest_hook(item, when, **kwds)
222 hook = item.ihook
223 report: TestReport = hook.pytest_runtest_makereport(item=item, call=call)
224 if log:
225 hook.pytest_runtest_logreport(report=report)
226 if check_interactive_exception(call, report):
227 hook.pytest_exception_interact(node=item, call=call, report=report)
228 return report
229
230
231def check_interactive_exception(call: "CallInfo[object]", report: BaseReport) -> bool:

Callers 1

runtestprotocolFunction · 0.85

Calls 4

call_runtest_hookFunction · 0.85

Tested by

no test coverage detected