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

Function _pretty_fixture_path

src/_pytest/python.py:1462–1469  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

1460
1461
1462def _pretty_fixture_path(func) -> str:
1463 cwd = Path.cwd()
1464 loc = Path(getlocation(func, str(cwd)))
1465 prefix = Path("...", "_pytest")
1466 try:
1467 return str(prefix / loc.relative_to(_PYTEST_DIR))
1468 except ValueError:
1469 return bestrelpath(cwd, loc)
1470
1471
1472def show_fixtures_per_test(config):

Callers 2

write_fixtureFunction · 0.85
_showfixtures_mainFunction · 0.85

Calls 2

getlocationFunction · 0.90
bestrelpathFunction · 0.90

Tested by

no test coverage detected