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

Method _raise_teardown_lookup_error

src/_pytest/fixtures.py:594–602  ·  view source on GitHub ↗
(self, argname: str)

Source from the content-addressed store, hash-verified

592 raise FixtureLookupError(None, self, msg)
593
594 def _raise_teardown_lookup_error(self, argname: str) -> NoReturn:
595 msg = (
596 f'The fixture value for "{argname}" is not available during teardown '
597 "because it was not previously requested.\n"
598 "Only fixtures that were already active can be retrieved during teardown.\n"
599 "Request the fixture before teardown begins by declaring it in the fixture "
600 "signature or by calling request.getfixturevalue() before the fixture yields."
601 )
602 raise FixtureLookupError(argname, self, msg)
603
604 def getfixturevalue(self, argname: str) -> Any:
605 """Dynamically run a named fixture function.

Callers 1

Calls 1

FixtureLookupErrorClass · 0.85

Tested by

no test coverage detected