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

Method toterminal

src/_pytest/fixtures.py:972–988  ·  view source on GitHub ↗
(self, tw: TerminalWriter)

Source from the content-addressed store, hash-verified

970 self.argname = argname
971
972 def toterminal(self, tw: TerminalWriter) -> None:
973 # tw.line("FixtureLookupError: %s" %(self.argname), red=True)
974 for tbline in self.tblines:
975 tw.line(tbline.rstrip())
976 lines = self.errorstring.split("\n")
977 if lines:
978 tw.line(
979 f"{ExceptionInfoFormatter.fail_marker} {lines[0].strip()}",
980 red=True,
981 )
982 for line in lines[1:]:
983 tw.line(
984 f"{ExceptionInfoFormatter.flow_marker} {line.strip()}",
985 red=True,
986 )
987 tw.line()
988 tw.line(f"{os.fspath(self.filename)}:{self.firstlineno + 1}")
989
990
991def call_fixture_func(

Callers

nothing calls this directly

Calls 3

stripMethod · 0.80
fspathMethod · 0.80
lineMethod · 0.45

Tested by

no test coverage detected