220 filename = fmatch.group(1) |
220 filename = fmatch.group(1) |
221 lineno = int(fmatch.group(2)) |
221 lineno = int(fmatch.group(2)) |
222 |
222 |
223 message = data.get("shortmsg", "") |
223 message = data.get("shortmsg", "") |
224 if not message and tracebackLines: |
224 if not message and tracebackLines: |
225 message = tracebackLines[-1].split(":", 1)[1].strip() |
225 # search the line containing the assertion error |
|
226 for index in range(len(tracebackLines) - 1, -1, -1): |
|
227 line = tracebackLines[index].strip() |
|
228 if line.startswith("AssertionError:"): |
|
229 message = line.replace("AssertionError:", "").strip() |
|
230 break |
226 |
231 |
227 self.testResult.emit( |
232 self.testResult.emit( |
228 TestResult( |
233 TestResult( |
229 category=self.__statusCategoryMapping[data["status"]], |
234 category=self.__statusCategoryMapping[data["status"]], |
230 status=self.__statusDisplayMapping[data["status"]], |
235 status=self.__statusDisplayMapping[data["status"]], |