Show test function, parameters and the fixtures of the test item.
(item: Item)
| 140 | |
| 141 | |
| 142 | def 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 | |
| 154 | def pytest_runtest_setup(item: Item) -> None: |
no test coverage detected