Show test function, parameters and the fixtures of the test item.
(item: Item, *, add_space: bool)
| 152 | |
| 153 | |
| 154 | def 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 | |
| 168 | def pytest_runtest_setup(item: Item) -> None: |
no test coverage detected
searching dependent graphs…