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

Method print_teardown_sections

src/_pytest/terminal.py:1176–1187  ·  view source on GitHub ↗
(self, rep: TestReport)

Source from the content-addressed store, hash-verified

1174 self.print_teardown_sections(report)
1175
1176 def print_teardown_sections(self, rep: TestReport) -> None:
1177 showcapture = self.config.option.showcapture
1178 if showcapture == "no":
1179 return
1180 for secname, content in rep.sections:
1181 if showcapture != "all" and showcapture not in secname:
1182 continue
1183 if "teardown" in secname:
1184 self._tw.sep("-", secname)
1185 if content[-1:] == "\n":
1186 content = content[:-1]
1187 self._tw.line(content)
1188
1189 def summary_failures(self) -> None:
1190 style = self.config.option.tbstyle

Callers 1

Calls 2

sepMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected