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

Method write_line

src/_pytest/terminal.py:534–538  ·  view source on GitHub ↗
(self, line: str | bytes, **markup: bool)

Source from the content-addressed store, hash-verified

532 self._tw.flush()
533
534 def write_line(self, line: str | bytes, **markup: bool) -> None:
535 if not isinstance(line, str):
536 line = str(line, errors="replace")
537 self.ensure_newline()
538 self._tw.line(line, **markup)
539
540 def rewrite(self, line: str, **markup: bool) -> None:
541 """Rewinds the terminal cursor to the beginning and writes the given line.

Callers 14

pytest_internalerrorMethod · 0.95
report_collectMethod · 0.95
pytest_sessionstartMethod · 0.95
pytest_sessionfinishMethod · 0.95
summary_statsMethod · 0.95
short_test_summaryMethod · 0.95
test_writelineMethod · 0.95
pytest_unconfigureFunction · 0.80
pytest_terminal_summaryFunction · 0.80

Calls 2

ensure_newlineMethod · 0.95
lineMethod · 0.45

Tested by 1

test_writelineMethod · 0.76