925 """ |
925 """ |
926 self.__sendJsonCommand("RequestCompletion", { |
926 self.__sendJsonCommand("RequestCompletion", { |
927 "text": text, |
927 "text": text, |
928 }) |
928 }) |
929 |
929 |
|
930 def remoteUTDiscover(self, syspath, workdir, discoveryStart): |
|
931 """ |
|
932 Public method to perform a test case discovery. |
|
933 |
|
934 @param syspath list of directories to be added to sys.path on the |
|
935 remote side |
|
936 @type list of str |
|
937 @param workdir path name of the working directory |
|
938 @type str |
|
939 @param discoveryStart directory to start auto-discovery at |
|
940 @type str |
|
941 """ |
|
942 self.__sendJsonCommand("RequestUTDiscover", { |
|
943 "syspath": [] if syspath is None else syspath, |
|
944 "workdir": workdir, |
|
945 "discoverystart": discoveryStart, |
|
946 }) |
|
947 |
930 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, |
948 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, |
931 syspath, workdir, discover, discoveryStart): |
949 syspath, workdir, discover, discoveryStart, testCases): |
932 """ |
950 """ |
933 Public method to prepare a new unittest run. |
951 Public method to prepare a new unittest run. |
934 |
952 |
935 @param fn name of file to load |
953 @param fn name of file to load |
936 @type str |
954 @type str |
954 @type str |
972 @type str |
955 @param discover flag indicating to discover the tests automatically |
973 @param discover flag indicating to discover the tests automatically |
956 @type bool |
974 @type bool |
957 @param discoveryStart directory to start auto-discovery at |
975 @param discoveryStart directory to start auto-discovery at |
958 @type str |
976 @type str |
|
977 @param testCases list of test cases to be loaded |
|
978 @type list of str |
959 """ |
979 """ |
960 if fn: |
980 if fn: |
961 self.__scriptName = os.path.abspath(fn) |
981 self.__scriptName = os.path.abspath(fn) |
962 |
982 |
963 fn = self.translate(os.path.abspath(fn), False) |
983 fn = self.translate(os.path.abspath(fn), False) |
974 "coverageerase": coverase, |
994 "coverageerase": coverase, |
975 "syspath": [] if syspath is None else syspath, |
995 "syspath": [] if syspath is None else syspath, |
976 "workdir": workdir, |
996 "workdir": workdir, |
977 "discover": discover, |
997 "discover": discover, |
978 "discoverystart": discoveryStart, |
998 "discoverystart": discoveryStart, |
|
999 "testcases": [] if testCases is None else testCases, |
979 }) |
1000 }) |
980 |
1001 |
981 def remoteUTRun(self): |
1002 def remoteUTRun(self): |
982 """ |
1003 """ |
983 Public method to start a unittest run. |
1004 Public method to start a unittest run. |
1191 |
1212 |
1192 elif method == "ResponseCompletion": |
1213 elif method == "ResponseCompletion": |
1193 self.debugServer.signalClientCompletionList( |
1214 self.debugServer.signalClientCompletionList( |
1194 params["completions"], params["text"]) |
1215 params["completions"], params["text"]) |
1195 |
1216 |
|
1217 elif method == "ResponseUTDiscover": |
|
1218 self.debugServer.clientUtDiscovered( |
|
1219 params["testCasesList"], params["exception"], |
|
1220 params["message"]) |
|
1221 |
1196 elif method == "ResponseUTPrepared": |
1222 elif method == "ResponseUTPrepared": |
1197 self.debugServer.clientUtPrepared( |
1223 self.debugServer.clientUtPrepared( |
1198 params["count"], params["exception"], params["message"]) |
1224 params["count"], params["exception"], params["message"]) |
1199 |
1225 |
1200 elif method == "ResponseUTFinished": |
1226 elif method == "ResponseUTFinished": |