Debugger/DebugServer.py

changeset 1499
b4d0457afb15
parent 1184
a9ce179c7c94
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1497:94f27ede4186 1499:b4d0457afb15
83 loaded a unittest suite 83 loaded a unittest suite
84 @signal utFinished() emitted after the client signalled the end of the unittest 84 @signal utFinished() emitted after the client signalled the end of the unittest
85 @signal utStartTest(testname, testdocu) emitted after the client has started 85 @signal utStartTest(testname, testdocu) emitted after the client has started
86 a test 86 a test
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, id) 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, id) emitted after the client reported
91 an errored test 91 an errored test
92 @signal utTestSkipped(testname, reason) emitted after the client reported 92 @signal utTestSkipped(testname, reason, id) emitted after the client reported
93 a skipped test 93 a skipped test
94 @signal utTestFailedExpected(testname, exc_info) emitted after the client reported 94 @signal utTestFailedExpected(testname, exc_info, id) emitted after the client reported
95 an expected test failure 95 an expected test failure
96 @signal utTestSucceededUnexpected(testname) emitted after the client reported 96 @signal utTestSucceededUnexpected(testname, id) emitted after the client reported
97 an unexpected test success 97 an unexpected test success
98 """ 98 """
99 clientClearBreak = pyqtSignal(str, int) 99 clientClearBreak = pyqtSignal(str, int)
100 clientClearWatch = pyqtSignal(str) 100 clientClearWatch = pyqtSignal(str)
101 clientGone = pyqtSignal(bool) 101 clientGone = pyqtSignal(bool)
120 clientCapabilities = pyqtSignal(int, str) 120 clientCapabilities = pyqtSignal(int, str)
121 clientCompletionList = pyqtSignal(list, str) 121 clientCompletionList = pyqtSignal(list, str)
122 utPrepared = pyqtSignal(int, str, str) 122 utPrepared = pyqtSignal(int, str, str)
123 utStartTest = pyqtSignal(str, str) 123 utStartTest = pyqtSignal(str, str)
124 utStopTest = pyqtSignal() 124 utStopTest = pyqtSignal()
125 utTestFailed = pyqtSignal(str, str) 125 utTestFailed = pyqtSignal(str, str, str)
126 utTestErrored = pyqtSignal(str, str) 126 utTestErrored = pyqtSignal(str, str, str)
127 utTestSkipped = pyqtSignal(str, str) 127 utTestSkipped = pyqtSignal(str, str, str)
128 utTestFailedExpected = pyqtSignal(str, str) 128 utTestFailedExpected = pyqtSignal(str, str, str)
129 utTestSucceededUnexpected = pyqtSignal(str) 129 utTestSucceededUnexpected = pyqtSignal(str, str)
130 utFinished = pyqtSignal() 130 utFinished = pyqtSignal()
131 passiveDebugStarted = pyqtSignal(str, bool) 131 passiveDebugStarted = pyqtSignal(str, bool)
132 132
133 def __init__(self): 133 def __init__(self):
134 """ 134 """
1012 1012
1013 @param text the text to be completed (string) 1013 @param text the text to be completed (string)
1014 """ 1014 """
1015 self.debuggerInterface.remoteCompletion(text) 1015 self.debuggerInterface.remoteCompletion(text)
1016 1016
1017 def remoteUTPrepare(self, fn, tn, tfn, cov, covname, coverase, clientType=""): 1017 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, clientType=""):
1018 """ 1018 """
1019 Public method to prepare a new unittest run. 1019 Public method to prepare a new unittest run.
1020 1020
1021 @param fn the filename to load (string) 1021 @param fn the filename to load (string)
1022 @param tn the testname to load (string) 1022 @param tn the testname to load (string)
1023 @param tfn the test function name to load tests from (string) 1023 @param tfn the test function name to load tests from (string)
1024 @param cov flag indicating collection of coverage data is requested 1024 @param failed list of failed test, if only failed test should be run
1025 (list of strings)
1026 @param cov flag indicating collection of coverage data is requested (boolean)
1025 @param covname filename to be used to assemble the coverage caches 1027 @param covname filename to be used to assemble the coverage caches
1026 filename (string) 1028 filename (string)
1027 @param coverase flag indicating erasure of coverage data is requested (boolean) 1029 @param coverase flag indicating erasure of coverage data is requested (boolean)
1028 @keyparam clientType client type to be used (string) 1030 @keyparam clientType client type to be used (string)
1029 """ 1031 """
1035 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]]) 1037 self.__setClientType(self.__clientAssociations[os.path.splitext(fn)[1]])
1036 except KeyError: 1038 except KeyError:
1037 self.__setClientType('Python3') # assume it is a Python3 file 1039 self.__setClientType('Python3') # assume it is a Python3 file
1038 self.startClient(False) 1040 self.startClient(False)
1039 1041
1040 self.debuggerInterface.remoteUTPrepare(fn, tn, tfn, cov, covname, coverase) 1042 self.debuggerInterface.remoteUTPrepare(
1043 fn, tn, tfn, failed, cov, covname, coverase)
1041 self.debugging = False 1044 self.debugging = False
1042 self.running = True 1045 self.running = True
1043 1046
1044 def remoteUTRun(self): 1047 def remoteUTRun(self):
1045 """ 1048 """
1258 """ 1261 """
1259 Public method to process the client stop test info. 1262 Public method to process the client stop test info.
1260 """ 1263 """
1261 self.utStopTest.emit() 1264 self.utStopTest.emit()
1262 1265
1263 def clientUtTestFailed(self, testname, traceback): 1266 def clientUtTestFailed(self, testname, traceback, id):
1264 """ 1267 """
1265 Public method to process the client test failed info. 1268 Public method to process the client test failed info.
1266 1269
1267 @param testname name of the test (string) 1270 @param testname name of the test (string)
1268 @param traceback lines of traceback info (list of strings) 1271 @param traceback lines of traceback info (list of strings)
1269 """ 1272 @param id id of the test (string)
1270 self.utTestFailed.emit(testname, traceback) 1273 """
1271 1274 self.utTestFailed.emit(testname, traceback, id)
1272 def clientUtTestErrored(self, testname, traceback): 1275
1276 def clientUtTestErrored(self, testname, traceback, id):
1273 """ 1277 """
1274 Public method to process the client test errored info. 1278 Public method to process the client test errored info.
1275 1279
1276 @param testname name of the test (string) 1280 @param testname name of the test (string)
1277 @param traceback lines of traceback info (list of strings) 1281 @param traceback lines of traceback info (list of strings)
1278 """ 1282 @param id id of the test (string)
1279 self.utTestErrored.emit(testname, traceback) 1283 """
1280 1284 self.utTestErrored.emit(testname, traceback, id)
1281 def clientUtTestSkipped(self, testname, reason): 1285
1286 def clientUtTestSkipped(self, testname, reason, id):
1282 """ 1287 """
1283 Public method to process the client test skipped info. 1288 Public method to process the client test skipped info.
1284 1289
1285 @param testname name of the test (string) 1290 @param testname name of the test (string)
1286 @param reason reason for skipping the test (string) 1291 @param reason reason for skipping the test (string)
1287 """ 1292 @param id id of the test (string)
1288 self.utTestSkipped.emit(testname, reason) 1293 """
1289 1294 self.utTestSkipped.emit(testname, reason, id)
1290 def clientUtTestFailedExpected(self, testname, traceback): 1295
1296 def clientUtTestFailedExpected(self, testname, traceback, id):
1291 """ 1297 """
1292 Public method to process the client test failed expected info. 1298 Public method to process the client test failed expected info.
1293 1299
1294 @param testname name of the test (string) 1300 @param testname name of the test (string)
1295 @param traceback lines of traceback info (list of strings) 1301 @param traceback lines of traceback info (list of strings)
1296 """ 1302 @param id id of the test (string)
1297 self.utTestFailedExpected.emit(testname, traceback) 1303 """
1298 1304 self.utTestFailedExpected.emit(testname, traceback, id)
1299 def clientUtTestSucceededUnexpected(self, testname): 1305
1306 def clientUtTestSucceededUnexpected(self, testname, id):
1300 """ 1307 """
1301 Public method to process the client test succeeded unexpected info. 1308 Public method to process the client test succeeded unexpected info.
1302 1309
1303 @param testname name of the test (string) 1310 @param testname name of the test (string)
1304 """ 1311 @param id id of the test (string)
1305 self.utTestSucceededUnexpected.emit(testname) 1312 """
1313 self.utTestSucceededUnexpected.emit(testname, id)
1306 1314
1307 def clientUtFinished(self): 1315 def clientUtFinished(self):
1308 """ 1316 """
1309 Public method to process the client unit test finished info. 1317 Public method to process the client unit test finished info.
1310 """ 1318 """

eric ide

mercurial