Merge pull request #5124 from blueyed/terminal-summary_failures

terminal: revisit summary_failures
This commit is contained in:
Bruno Oliveira 2019-04-15 11:26:52 -03:00 committed by GitHub
commit c8b904a406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 6 deletions

View File

@ -828,17 +828,22 @@ class TerminalReporter(object):
if not reports:
return
self.write_sep("=", "FAILURES")
for rep in reports:
if self.config.option.tbstyle == "line":
if self.config.option.tbstyle == "line":
for rep in reports:
line = self._getcrashline(rep)
self.write_line(line)
else:
else:
teardown_sections = {}
for report in self.getreports(""):
if report.when == "teardown":
teardown_sections.setdefault(report.nodeid, []).append(report)
for rep in reports:
msg = self._getfailureheadline(rep)
self.write_sep("_", msg, red=True, bold=True)
self._outrep_summary(rep)
for report in self.getreports(""):
if report.nodeid == rep.nodeid and report.when == "teardown":
self.print_teardown_sections(report)
for report in teardown_sections.get(rep.nodeid, []):
self.print_teardown_sections(report)
def summary_errors(self):
if self.config.option.tbstyle != "no":