eric6/PyUnit/UnittestDialog.py

changeset 7960
e8fc383322f7
parent 7923
91e843545d9a
child 8029
5feb4f723f07
equal deleted inserted replaced
7959:44e15eda6506 7960:e8fc383322f7
53 Constructor 53 Constructor
54 54
55 @param prog filename of the program to open 55 @param prog filename of the program to open
56 @type str 56 @type str
57 @param dbs reference to the debug server object. It is an indication 57 @param dbs reference to the debug server object. It is an indication
58 whether we were called from within the eric6 IDE. 58 whether we were called from within the eric IDE.
59 @type DebugServer 59 @type DebugServer
60 @param ui reference to the UI object 60 @param ui reference to the UI object
61 @type UserInterface 61 @type UserInterface
62 @param parent parent widget of this dialog 62 @param parent parent widget of this dialog
63 @type QWidget 63 @type QWidget
163 "^Error: ", 163 "^Error: ",
164 ] 164 ]
165 165
166 self.__failedTests = [] 166 self.__failedTests = []
167 167
168 # now connect the debug server signals if called from the eric6 IDE 168 # now connect the debug server signals if called from the eric IDE
169 if self.__dbs: 169 if self.__dbs:
170 self.__dbs.utDiscovered.connect(self.__UTDiscovered) 170 self.__dbs.utDiscovered.connect(self.__UTDiscovered)
171 self.__dbs.utPrepared.connect(self.__UTPrepared) 171 self.__dbs.utPrepared.connect(self.__UTPrepared)
172 self.__dbs.utFinished.connect(self.__setStoppedMode) 172 self.__dbs.utFinished.connect(self.__setStoppedMode)
173 self.__dbs.utStartTest.connect(self.testStarted) 173 self.__dbs.utStartTest.connect(self.testStarted)
377 377
378 self.testName = self.tr("Unittest with auto-discovery") 378 self.testName = self.tr("Unittest with auto-discovery")
379 if self.__dbs: 379 if self.__dbs:
380 venvName = self.venvComboBox.currentText() 380 venvName = self.venvComboBox.currentText()
381 381
382 # we are cooperating with the eric6 IDE 382 # we are cooperating with the eric IDE
383 project = e5App().getObject("Project") 383 project = e5App().getObject("Project")
384 if self.__forProject: 384 if self.__forProject:
385 mainScript = project.getMainScript(True) 385 mainScript = project.getMainScript(True)
386 clientType = project.getProjectLanguage() 386 clientType = project.getProjectLanguage()
387 if mainScript: 387 if mainScript:
719 return 719 return
720 720
721 if self.__dbs: 721 if self.__dbs:
722 venvName = self.venvComboBox.currentText() 722 venvName = self.venvComboBox.currentText()
723 723
724 # we are cooperating with the eric6 IDE 724 # we are cooperating with the eric IDE
725 project = e5App().getObject("Project") 725 project = e5App().getObject("Project")
726 if self.__forProject: 726 if self.__forProject:
727 mainScript = project.getMainScript(True) 727 mainScript = project.getMainScript(True)
728 clientType = project.getProjectLanguage() 728 clientType = project.getProjectLanguage()
729 if mainScript: 729 if mainScript:
1153 self.dlg.show() 1153 self.dlg.show()
1154 self.dlg.exec() 1154 self.dlg.exec()
1155 1155
1156 def __showSource(self): 1156 def __showSource(self):
1157 """ 1157 """
1158 Private slot to show the source of a traceback in an eric6 editor. 1158 Private slot to show the source of a traceback in an eric editor.
1159 """ 1159 """
1160 # get the error info 1160 # get the error info
1161 tracebackLines = self.dlg.traceback.toPlainText().splitlines() 1161 tracebackLines = self.dlg.traceback.toPlainText().splitlines()
1162 # find the last entry matching the pattern 1162 # find the last entry matching the pattern
1163 for index in range(len(tracebackLines) - 1, -1, -1): 1163 for index in range(len(tracebackLines) - 1, -1, -1):

eric ide

mercurial