File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -828,17 +828,22 @@ def summary_failures(self):
828
828
if not reports :
829
829
return
830
830
self .write_sep ("=" , "FAILURES" )
831
- for rep in reports :
832
- if self . config . option . tbstyle == "line" :
831
+ if self . config . option . tbstyle == "line" :
832
+ for rep in reports :
833
833
line = self ._getcrashline (rep )
834
834
self .write_line (line )
835
- else :
835
+ else :
836
+ teardown_sections = {}
837
+ for report in self .getreports ("" ):
838
+ if report .when == "teardown" :
839
+ teardown_sections .setdefault (report .nodeid , []).append (report )
840
+
841
+ for rep in reports :
836
842
msg = self ._getfailureheadline (rep )
837
843
self .write_sep ("_" , msg , red = True , bold = True )
838
844
self ._outrep_summary (rep )
839
- for report in self .getreports ("" ):
840
- if report .nodeid == rep .nodeid and report .when == "teardown" :
841
- self .print_teardown_sections (report )
845
+ for report in teardown_sections .get (rep .nodeid , []):
846
+ self .print_teardown_sections (report )
842
847
843
848
def summary_errors (self ):
844
849
if self .config .option .tbstyle != "no" :
You can’t perform that action at this time.
0 commit comments