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

Method toterminal

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

Source from the content-addressed store, hash-verified

1343 entrysep: ClassVar = "_ "
1344
1345 def toterminal(self, tw: TerminalWriter) -> None:
1346 # The entries might have different styles.
1347 for i, entry in enumerate(self.reprentries):
1348 if entry.style == "long":
1349 tw.line("")
1350 entry.toterminal(tw)
1351 if i < len(self.reprentries) - 1:
1352 next_entry = self.reprentries[i + 1]
1353 if entry.style == "long" or (
1354 entry.style == "short" and next_entry.style == "long"
1355 ):
1356 tw.sep(self.entrysep)
1357
1358 if self.extraline:
1359 tw.line(self.extraline)
1360
1361
1362class ReprTracebackNative(ReprTraceback):

Callers

nothing calls this directly

Calls 3

lineMethod · 0.45
toterminalMethod · 0.45
sepMethod · 0.45

Tested by

no test coverage detected