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

Method toterminal

src/_pytest/_code/code.py:1454–1474  ·  view source on GitHub ↗
(self, tw: TerminalWriter)

Source from the content-addressed store, hash-verified

1452 tw.line(line, bold=True, red=True)
1453
1454 def toterminal(self, tw: TerminalWriter) -> None:
1455 if self.style == "short":
1456 if self.reprfileloc:
1457 self.reprfileloc.toterminal(tw)
1458 self._write_entry_lines(tw)
1459 if self.reprlocals:
1460 self.reprlocals.toterminal(tw, indent=" " * 8)
1461 return
1462
1463 if self.reprfuncargs:
1464 self.reprfuncargs.toterminal(tw)
1465
1466 self._write_entry_lines(tw)
1467
1468 if self.reprlocals:
1469 tw.line("")
1470 self.reprlocals.toterminal(tw)
1471 if self.reprfileloc:
1472 if self.lines:
1473 tw.line("")
1474 self.reprfileloc.toterminal(tw)
1475
1476 def __str__(self) -> str:
1477 return "{}\n{}\n{}".format(

Callers 3

toterminalMethod · 0.45
toterminalMethod · 0.45
toterminalMethod · 0.45

Calls 2

_write_entry_linesMethod · 0.95
lineMethod · 0.45

Tested by

no test coverage detected