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

Function fail_fixturefunc

src/_pytest/fixtures.py:901–905  ·  view source on GitHub ↗
(fixturefunc, msg: str)

Source from the content-addressed store, hash-verified

899
900
901def fail_fixturefunc(fixturefunc, msg: str) -> "NoReturn":
902 fs, lineno = getfslineno(fixturefunc)
903 location = f"{fs}:{lineno + 1}"
904 source = _pytest._code.Source(fixturefunc)
905 fail(msg + ":\n\n" + str(source.indent()) + "\n" + location, pytrace=False)
906
907
908def call_fixture_func(

Callers 1

_teardown_yield_fixtureFunction · 0.85

Calls 3

indentMethod · 0.95
getfslinenoFunction · 0.90
failFunction · 0.90

Tested by

no test coverage detected