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

Function show_test_item

src/_pytest/runner.py:154–165  ·  view source on GitHub ↗

Show test function, parameters and the fixtures of the test item.

(item: Item, *, add_space: bool)

Source from the content-addressed store, hash-verified

152
153
154def show_test_item(item: Item, *, add_space: bool) -> None:
155 """Show test function, parameters and the fixtures of the test item."""
156 tw = item.config.get_terminal_writer()
157 tw.line()
158 tw.write(" " * 8)
159 tw.write(item.nodeid)
160 used_fixtures = sorted(getattr(item, "fixturenames", []))
161 if used_fixtures:
162 tw.write(f" (fixtures used: {', '.join(used_fixtures)})")
163 if add_space:
164 tw.write(" ")
165 tw.flush()
166
167
168def pytest_runtest_setup(item: Item) -> None:

Callers 1

runtestprotocolFunction · 0.85

Calls 5

joinMethod · 0.80
get_terminal_writerMethod · 0.45
lineMethod · 0.45
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…