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

Function show_test_item

src/_pytest/runner.py:142–151  ·  view source on GitHub ↗

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

(item: Item)

Source from the content-addressed store, hash-verified

140
141
142def show_test_item(item: Item) -> None:
143 """Show test function, parameters and the fixtures of the test item."""
144 tw = item.config.get_terminal_writer()
145 tw.line()
146 tw.write(" " * 8)
147 tw.write(item.nodeid)
148 used_fixtures = sorted(getattr(item, "fixturenames", []))
149 if used_fixtures:
150 tw.write(" (fixtures used: {})".format(", ".join(used_fixtures)))
151 tw.flush()
152
153
154def pytest_runtest_setup(item: Item) -> None:

Callers 1

runtestprotocolFunction · 0.85

Calls 5

get_terminal_writerMethod · 0.80
lineMethod · 0.45
writeMethod · 0.45
formatMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected