MCPcopy Create free account
hub / github.com/pytest-dev/pytest / write_line

Method write_line

src/_pytest/terminal.py:419–423  ·  view source on GitHub ↗
(self, line: Union[str, bytes], **markup: bool)

Source from the content-addressed store, hash-verified

417 self._tw.flush()
418
419 def write_line(self, line: Union[str, bytes], **markup: bool) -> None:
420 if not isinstance(line, str):
421 line = str(line, errors="replace")
422 self.ensure_newline()
423 self._tw.line(line, **markup)
424
425 def rewrite(self, line: str, **markup: bool) -> None:
426 """Rewinds the terminal cursor to the beginning and writes the given line.

Callers 13

pytest_internalerrorMethod · 0.95
report_collectMethod · 0.95
pytest_sessionstartMethod · 0.95
summary_failuresMethod · 0.95
summary_statsMethod · 0.95
short_test_summaryMethod · 0.95
test_writelineMethod · 0.95
pytest_unconfigureFunction · 0.80
pytest_terminal_summaryFunction · 0.80
mywriterFunction · 0.80

Calls 2

ensure_newlineMethod · 0.95
lineMethod · 0.45

Tested by 1

test_writelineMethod · 0.76