PyUnit/UnittestDialog.py

changeset 500
c3abc7895a01
parent 481
ad71812ba395
child 501
5c615a85241a
equal deleted inserted replaced
499:622ab17a68d5 500:c3abc7895a01
31 31
32 class UnittestDialog(QWidget, Ui_UnittestDialog): 32 class UnittestDialog(QWidget, Ui_UnittestDialog):
33 """ 33 """
34 Class implementing the UI to the pyunit package. 34 Class implementing the UI to the pyunit package.
35 35
36 @signal unittestFile(string,int,int) emitted to show the source of a unittest file 36 @signal unittestFile(string, int, int) emitted to show the source of a unittest file
37 """ 37 """
38 unittestFile = pyqtSignal(str, int, int)
39
38 def __init__(self,prog = None,dbs = None,ui = None,parent = None,name = None): 40 def __init__(self,prog = None,dbs = None,ui = None,parent = None,name = None):
39 """ 41 """
40 Constructor 42 Constructor
41 43
42 @param prog filename of the program to open 44 @param prog filename of the program to open
496 fmatch = re.search(r'File "(.*?)", line (\d*?),.*', tracebackLines[index]) 498 fmatch = re.search(r'File "(.*?)", line (\d*?),.*', tracebackLines[index])
497 if fmatch: 499 if fmatch:
498 break 500 break
499 if fmatch: 501 if fmatch:
500 fn, ln = fmatch.group(1, 2) 502 fn, ln = fmatch.group(1, 2)
501 self.emit(SIGNAL('unittestFile'), fn, int(ln), 1) 503 self.unittestFile.emit(fn, int(ln), 1)
502 504
503 class QtTestResult(unittest.TestResult): 505 class QtTestResult(unittest.TestResult):
504 """ 506 """
505 A TestResult derivative to work with a graphical GUI. 507 A TestResult derivative to work with a graphical GUI.
506 508

eric ide

mercurial