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

Method toterminal

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

Source from the content-addressed store, hash-verified

1157 message: str
1158
1159 def toterminal(self, tw: TerminalWriter) -> None:
1160 # Filename and lineno output for each entry, using an output format
1161 # that most editors understand.
1162 msg = self.message
1163 i = msg.find("\n")
1164 if i != -1:
1165 msg = msg[:i]
1166 tw.write(self.path, bold=True, red=True)
1167 tw.line(f":{self.lineno}: {msg}")
1168
1169
1170@attr.s(eq=False, auto_attribs=True)

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected