Debugger/DebugServer.py

changeset 1166
a94b0a2fafd7
parent 1131
7781e396c903
child 1179
7661ab683f7b
equal deleted inserted replaced
1163:0155e7aa345d 1166:a94b0a2fafd7
87 @signal utStopTest() emitted after the client has finished a test 87 @signal utStopTest() emitted after the client has finished a test
88 @signal utTestFailed(testname, exc_info) emitted after the client reported 88 @signal utTestFailed(testname, exc_info) emitted after the client reported
89 a failed test 89 a failed test
90 @signal utTestErrored(testname, exc_info) emitted after the client reported 90 @signal utTestErrored(testname, exc_info) emitted after the client reported
91 an errored test 91 an errored test
92 @signal utTestSkipped(testname, reason) emitted after the client reported
93 a skipped test
94 @signal utTestFailedExpected(testname, exc_info) emitted after the client reported
95 an expected test failure
96 @signal utTestSucceededUnexpected(testname) emitted after the client reported
97 an unexpected test success
92 """ 98 """
93 clientClearBreak = pyqtSignal(str, int) 99 clientClearBreak = pyqtSignal(str, int)
94 clientClearWatch = pyqtSignal(str) 100 clientClearWatch = pyqtSignal(str)
95 clientGone = pyqtSignal(bool) 101 clientGone = pyqtSignal(bool)
96 clientProcessStdout = pyqtSignal(str) 102 clientProcessStdout = pyqtSignal(str)
114 clientCapabilities = pyqtSignal(int, str) 120 clientCapabilities = pyqtSignal(int, str)
115 clientCompletionList = pyqtSignal(list, str) 121 clientCompletionList = pyqtSignal(list, str)
116 utPrepared = pyqtSignal(int, str, str) 122 utPrepared = pyqtSignal(int, str, str)
117 utStartTest = pyqtSignal(str, str) 123 utStartTest = pyqtSignal(str, str)
118 utStopTest = pyqtSignal() 124 utStopTest = pyqtSignal()
119 utTestFailed = pyqtSignal(str, list) 125 utTestFailed = pyqtSignal(str, str)
120 utTestErrored = pyqtSignal(str, list) 126 utTestErrored = pyqtSignal(str, str)
127 utTestSkipped = pyqtSignal(str, str)
128 utTestFailedExpected = pyqtSignal(str, str)
129 utTestSucceededUnexpected = pyqtSignal(str)
121 utFinished = pyqtSignal() 130 utFinished = pyqtSignal()
122 passiveDebugStarted = pyqtSignal(str, bool) 131 passiveDebugStarted = pyqtSignal(str, bool)
123 132
124 def __init__(self): 133 def __init__(self):
125 """ 134 """
979 988
980 @param text the text to be completed (string) 989 @param text the text to be completed (string)
981 """ 990 """
982 self.debuggerInterface.remoteCompletion(text) 991 self.debuggerInterface.remoteCompletion(text)
983 992
984 def remoteUTPrepare(self, fn, tn, tfn, cov, covname, coverase): 993 def remoteUTPrepare(self, fn, tn, tfn, cov, covname, coverase, clientType=""):
985 """ 994 """
986 Public method to prepare a new unittest run. 995 Public method to prepare a new unittest run.
987 996
988 @param fn the filename to load (string) 997 @param fn the filename to load (string)
989 @param tn the testname to load (string) 998 @param tn the testname to load (string)
990 @param tfn the test function name to load tests from (string) 999 @param tfn the test function name to load tests from (string)
991 @param cov flag indicating collection of coverage data is requested 1000 @param cov flag indicating collection of coverage data is requested
992 @param covname filename to be used to assemble the coverage caches 1001 @param covname filename to be used to assemble the coverage caches
993 filename (string) 1002 filename (string)
994 @param coverase flag indicating erasure of coverage data is requested (boolean) 1003 @param coverase flag indicating erasure of coverage data is requested (boolean)
1004 @keyparam clientType client type to be used (string)
995 """ 1005 """
996 # Restart the client if there is already a program loaded. 1006 # Restart the client if there is already a program loaded.
997 try: 1007 try:
998 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) 1008 if clientType:
1009 self.__setClientType(clientType)
1010 else:
1011 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]])
999 except KeyError: 1012 except KeyError:
1000 self.__setClientType('Python3') # assume it is a Python3 file 1013 self.__setClientType('Python3') # assume it is a Python3 file
1001 self.startClient(False) 1014 self.startClient(False)
1002 1015
1003 self.debuggerInterface.remoteUTPrepare(fn, tn, tfn, cov, covname, coverase) 1016 self.debuggerInterface.remoteUTPrepare(fn, tn, tfn, cov, covname, coverase)
1239 @param testname name of the test (string) 1252 @param testname name of the test (string)
1240 @param traceback lines of traceback info (list of strings) 1253 @param traceback lines of traceback info (list of strings)
1241 """ 1254 """
1242 self.utTestErrored.emit(testname, traceback) 1255 self.utTestErrored.emit(testname, traceback)
1243 1256
1257 def clientUtTestSkipped(self, testname, reason):
1258 """
1259 Public method to process the client test skipped info.
1260
1261 @param testname name of the test (string)
1262 @param reason reason for skipping the test (string)
1263 """
1264 self.utTestSkipped.emit(testname, reason)
1265
1266 def clientUtTestFailedExpected(self, testname, traceback):
1267 """
1268 Public method to process the client test failed expected info.
1269
1270 @param testname name of the test (string)
1271 @param traceback lines of traceback info (list of strings)
1272 """
1273 self.utTestFailedExpected.emit(testname, traceback)
1274
1275 def clientUtTestSucceededUnexpected(self, testname):
1276 """
1277 Public method to process the client test succeeded unexpected info.
1278
1279 @param testname name of the test (string)
1280 """
1281 self.utTestSucceededUnexpected.emit(testname)
1282
1244 def clientUtFinished(self): 1283 def clientUtFinished(self):
1245 """ 1284 """
1246 Public method to process the client unit test finished info. 1285 Public method to process the client unit test finished info.
1247 """ 1286 """
1248 self.utFinished.emit() 1287 self.utFinished.emit()

eric ide

mercurial