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

Function write_item

src/_pytest/fixtures.py:2251–2263  ·  view source on GitHub ↗
(item: nodes.Item)

Source from the content-addressed store, hash-verified

2249 tw.line(" no docstring available", red=True)
2250
2251 def write_item(item: nodes.Item) -> None:
2252 fixturedefs = list(_get_fixtures_per_test(item))
2253 if not fixturedefs:
2254 # This test item does not use any fixtures.
2255 return
2256
2257 tw.line()
2258 tw.sep("-", f"fixtures used by {item.name}")
2259 # TODO: Fix this type ignore.
2260 tw.sep("-", f"({get_best_relpath(item.function)})") # type: ignore[attr-defined]
2261
2262 for fixturedef in fixturedefs:
2263 write_fixture(fixturedef)
2264
2265 for session_item in session.items:
2266 write_item(session_item)

Callers 1

_show_fixtures_per_testFunction · 0.85

Calls 5

_get_fixtures_per_testFunction · 0.85
get_best_relpathFunction · 0.85
write_fixtureFunction · 0.85
lineMethod · 0.45
sepMethod · 0.45

Tested by

no test coverage detected