241 Public method to clear the model data. |
241 Public method to clear the model data. |
242 """ |
242 """ |
243 self.beginResetModel() |
243 self.beginResetModel() |
244 self.__testResults.clear() |
244 self.__testResults.clear() |
245 self.endResetModel() |
245 self.endResetModel() |
|
246 |
|
247 self.summary.emit("") |
246 |
248 |
247 def sort(self, column, order): |
249 def sort(self, column, order): |
248 """ |
250 """ |
249 Public method to sort the model data by column in order. |
251 Public method to sort the model data by column in order. |
250 |
252 |
353 self.summary.emit(self.__summary()) |
355 self.summary.emit(self.__summary()) |
354 |
356 |
355 if testResultsToBeAdded: |
357 if testResultsToBeAdded: |
356 self.addTestResults(testResultsToBeAdded) |
358 self.addTestResults(testResultsToBeAdded) |
357 |
359 |
|
360 def getFailedTests(self): |
|
361 """ |
|
362 Public method to extract the test ids of all failed tests. |
|
363 |
|
364 @return test ids of all failed tests |
|
365 @rtype list of str |
|
366 """ |
|
367 failedIds = [ |
|
368 res.id for res in self.__testResults if ( |
|
369 res.category == ResultCategory.FAIL and |
|
370 not res.subtestResult |
|
371 ) |
|
372 ] |
|
373 return failedIds |
|
374 |
358 def __summary(self): |
375 def __summary(self): |
359 """ |
376 """ |
360 Private method to generate a test results summary text. |
377 Private method to generate a test results summary text. |
361 |
378 |
362 @return test results summary text |
379 @return test results summary text |