MCPcopy
hub / github.com/pytest-dev/pytest / pytest_runtest_call

Function pytest_runtest_call

src/_pytest/skipping.py:259–273  ·  view source on GitHub ↗
(item: Item)

Source from the content-addressed store, hash-verified

257
258@hookimpl(wrapper=True)
259def pytest_runtest_call(item: Item) -> Generator[None]:
260 xfailed = item.stash.get(xfailed_key, None)
261 if xfailed is None:
262 item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item)
263
264 if xfailed and not item.config.option.runxfail and not xfailed.run:
265 xfail("[NOTRUN] " + xfailed.reason)
266
267 try:
268 return (yield)
269 finally:
270 # The test run may have added an xfail mark dynamically.
271 xfailed = item.stash.get(xfailed_key, None)
272 if xfailed is None:
273 item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item)
274
275
276@hookimpl(wrapper=True)

Callers

nothing calls this directly

Calls 2

evaluate_xfail_marksFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected