(fixture_def: FixtureDef[object])
| 2230 | return bestrelpath(invocation_dir, Path(loc)) |
| 2231 | |
| 2232 | def write_fixture(fixture_def: FixtureDef[object]) -> None: |
| 2233 | argname = fixture_def.argname |
| 2234 | if verbose <= 0 and argname.startswith("_"): |
| 2235 | return |
| 2236 | prettypath = _pretty_fixture_path(invocation_dir, fixture_def.func) |
| 2237 | tw.write(f"{argname}", green=True) |
| 2238 | tw.write(f" -- {prettypath}", yellow=True) |
| 2239 | tw.write("\n") |
| 2240 | fixture_doc = inspect.getdoc(fixture_def.func) |
| 2241 | if fixture_doc: |
| 2242 | write_docstring( |
| 2243 | tw, |
| 2244 | fixture_doc.split("\n\n", maxsplit=1)[0] |
| 2245 | if verbose <= 0 |
| 2246 | else fixture_doc, |
| 2247 | ) |
| 2248 | else: |
| 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)) |
no test coverage detected