865 (boolean) |
865 (boolean) |
866 """ |
866 """ |
867 self.__scriptName = os.path.abspath(fn) |
867 self.__scriptName = os.path.abspath(fn) |
868 |
868 |
869 fn = self.translate(os.path.abspath(fn), False) |
869 fn = self.translate(os.path.abspath(fn), False) |
870 self.__sendCommand('{0}{1}|{2}|{3}|{4}|{5:d}|{6}|{7:d}\n'.format( |
870 ## self.__sendCommand('{0}{1}|{2}|{3}|{4}|{5:d}|{6}|{7:d}\n'.format( |
871 DebugProtocol.RequestUTPrepare, fn, tn, tfn, str(failed), |
871 ## DebugProtocol.RequestUTPrepare, fn, tn, tfn, str(failed), |
872 cov, covname, coverase)) |
872 ## cov, covname, coverase)) |
|
873 self.__sendJsonCommand("RequestUTPrepare", { |
|
874 "filename": fn, |
|
875 "testname": tn, |
|
876 "testfunctionname": tfn, |
|
877 "failed": failed, |
|
878 "coverage": cov, |
|
879 "coveragefile": covname, |
|
880 "coverageerase": coverase, |
|
881 }) |
873 |
882 |
874 def remoteUTRun(self): |
883 def remoteUTRun(self): |
875 """ |
884 """ |
876 Public method to start a unittest run. |
885 Public method to start a unittest run. |
877 """ |
886 """ |
1108 ## exc = bool(exc) |
1117 ## exc = bool(exc) |
1109 ## fn = self.translate(fn, True) |
1118 ## fn = self.translate(fn, True) |
1110 ## self.debugServer.passiveStartUp(fn, exc) |
1119 ## self.debugServer.passiveStartUp(fn, exc) |
1111 ## continue |
1120 ## continue |
1112 ## |
1121 ## |
1113 if resp == DebugProtocol.ResponseUTPrepared: |
1122 ## if resp == DebugProtocol.ResponseUTPrepared: |
1114 res, exc_type, exc_value = eval(line[eoc:-1]) |
1123 ## res, exc_type, exc_value = eval(line[eoc:-1]) |
1115 self.debugServer.clientUtPrepared(res, exc_type, exc_value) |
1124 ## self.debugServer.clientUtPrepared(res, exc_type, exc_value) |
1116 continue |
1125 ## continue |
1117 |
1126 ## |
1118 if resp == DebugProtocol.ResponseUTStartTest: |
1127 if resp == DebugProtocol.ResponseUTStartTest: |
1119 testname, doc = eval(line[eoc:-1]) |
1128 testname, doc = eval(line[eoc:-1]) |
1120 self.debugServer.clientUtStartTest(testname, doc) |
1129 self.debugServer.clientUtStartTest(testname, doc) |
1121 continue |
1130 continue |
1122 |
1131 |
1313 self.debugServer.passiveStartUp( |
1322 self.debugServer.passiveStartUp( |
1314 self.translate(params["filename"], True), params["exceptions"]) |
1323 self.translate(params["filename"], True), params["exceptions"]) |
1315 return |
1324 return |
1316 |
1325 |
1317 if method == "ResponseCompletion": |
1326 if method == "ResponseCompletion": |
1318 ## clstring, text = line[eoc:-1].split('||') |
|
1319 ## cl = eval(clstring) |
|
1320 self.debugServer.signalClientCompletionList( |
1327 self.debugServer.signalClientCompletionList( |
1321 params["completions"], params["text"]) |
1328 params["completions"], params["text"]) |
|
1329 return |
|
1330 |
|
1331 if method == "ResponseUTPrepared": |
|
1332 self.debugServer.clientUtPrepared( |
|
1333 params["count"], params["exception"], params["message"]) |
1322 return |
1334 return |
1323 |
1335 |
1324 def __sendCommand(self, cmd): |
1336 def __sendCommand(self, cmd): |
1325 """ |
1337 """ |
1326 Private method to send a single line command to the client. |
1338 Private method to send a single line command to the client. |