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

Method write_fspath_result

src/_pytest/terminal.py:478–487  ·  view source on GitHub ↗
(self, nodeid: str, res: str, **markup: bool)

Source from the content-addressed store, hash-verified

476 return char in self.reportchars
477
478 def write_fspath_result(self, nodeid: str, res: str, **markup: bool) -> None:
479 fspath = self.config.rootpath / nodeid.split("::", maxsplit=1)[0]
480 if self.currentfspath is None or fspath != self.currentfspath:
481 if self.currentfspath is not None and self._show_progress_info:
482 self._write_progress_information_filling_space()
483 self.currentfspath = fspath
484 relfspath = bestrelpath(self.startpath, fspath)
485 self._tw.line()
486 self._tw.write(relfspath + " ")
487 self._tw.write(res, flush=True, **markup)
488
489 def write_ensure_prefix(self, prefix: str, extra: str = "", **kwargs) -> None:
490 if self.currentfspath != prefix:

Callers 2

test_writelineMethod · 0.95

Calls 4

bestrelpathFunction · 0.90
lineMethod · 0.45
writeMethod · 0.45

Tested by 1

test_writelineMethod · 0.76