File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -98,16 +98,29 @@ def _(report: CollectReport):
98
98
if report .nodeid == "" :
99
99
return CollectionError (name = test_collection_stage , repr_ = str (report .longrepr ))
100
100
101
- parsed = parse_nodeid (report .nodeid )
102
- message = report .longrepr .split ("\n " )[- 1 ].removeprefix ("E" ).lstrip ()
101
+ if "::" not in report .nodeid :
102
+ parsed = {
103
+ "filepath" : report .nodeid ,
104
+ "name" : None ,
105
+ "variant" : None ,
106
+ }
107
+ else :
108
+ parsed = parse_nodeid (report .nodeid )
109
+
110
+ if isinstance (report .longrepr , str ):
111
+ message = report .longrepr .split ("\n " )[- 1 ].removeprefix ("E" ).lstrip ()
112
+ else :
113
+ message = report .longrepr .chain [0 ][1 ].message
103
114
return PreformattedReport (message = message , ** parsed )
104
115
105
116
106
117
def format_summary (report ):
107
118
if report .variant is not None :
108
119
return f"{ report .filepath } ::{ report .name } [{ report .variant } ]: { report .message } "
109
- else :
120
+ elif report . name is not None :
110
121
return f"{ report .filepath } ::{ report .name } : { report .message } "
122
+ else :
123
+ return f"{ report .filepath } : { report .message } "
111
124
112
125
113
126
def format_report (summaries , py_version ):
You can’t perform that action at this time.
0 commit comments