PyUnit/UnittestDialog.py

changeset 5409
c6f4a6f0d051
parent 5389
9b1c800daff3
child 5603
4f2dd0850803
equal deleted inserted replaced
5408:b67e07566aa1 5409:c6f4a6f0d051
118 self.insertProg(prog) 118 self.insertProg(prog)
119 119
120 self.rxPatterns = [ 120 self.rxPatterns = [
121 self.tr("^Failure: "), 121 self.tr("^Failure: "),
122 self.tr("^Error: "), 122 self.tr("^Error: "),
123 # These are for untranslated/partially translated situations
124 "^Failure: ",
125 "^Error: ",
123 ] 126 ]
124 127
125 self.__failedTests = [] 128 self.__failedTests = []
126 129
127 # now connect the debug server signals if called from the eric6 IDE 130 # now connect the debug server signals if called from the eric6 IDE
423 @param text current text (string) 426 @param text current text (string)
424 """ 427 """
425 if text: 428 if text:
426 for pattern in self.rxPatterns: 429 for pattern in self.rxPatterns:
427 text = re.sub(pattern, "", text) 430 text = re.sub(pattern, "", text)
428 itm = self.testsListWidget.findItems( 431
429 text, Qt.MatchFlags(Qt.MatchExactly))[0] 432 foundItems = self.testsListWidget.findItems(
430 self.testsListWidget.setCurrentItem(itm) 433 text, Qt.MatchFlags(Qt.MatchExactly))
431 self.testsListWidget.scrollToItem(itm) 434 if len(foundItems) > 0:
435 itm = foundItems[0]
436 self.testsListWidget.setCurrentItem(itm)
437 self.testsListWidget.scrollToItem(itm)
432 438
433 def __setRunningMode(self): 439 def __setRunningMode(self):
434 """ 440 """
435 Private method to set the GUI in running mode. 441 Private method to set the GUI in running mode.
436 """ 442 """

eric ide

mercurial