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

Function _pretty_fixture_path

src/_pytest/fixtures.py:2181–2187  ·  view source on GitHub ↗
(invocation_dir: Path, func)

Source from the content-addressed store, hash-verified

2179
2180
2181def _pretty_fixture_path(invocation_dir: Path, func) -> str:
2182 loc = Path(getlocation(func, invocation_dir))
2183 prefix = Path("...", "_pytest")
2184 try:
2185 return str(prefix / loc.relative_to(_PYTEST_DIR))
2186 except ValueError:
2187 return bestrelpath(invocation_dir, loc)
2188
2189
2190def _get_fixtures_per_test(test: nodes.Item) -> Iterator[FixtureDef[object]]:

Callers 2

write_fixtureFunction · 0.85
_showfixtures_mainFunction · 0.85

Calls 2

getlocationFunction · 0.90
bestrelpathFunction · 0.90

Tested by

no test coverage detected