926 self.__sendJsonCommand("RequestCompletion", { |
926 self.__sendJsonCommand("RequestCompletion", { |
927 "text": text, |
927 "text": text, |
928 }) |
928 }) |
929 |
929 |
930 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, |
930 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, |
931 syspath): |
931 syspath, workdir, discover, discoveryStart): |
932 """ |
932 """ |
933 Public method to prepare a new unittest run. |
933 Public method to prepare a new unittest run. |
934 |
934 |
935 @param fn name of file to load |
935 @param fn name of file to load |
936 @type str |
936 @type str |
948 @param coverase flag indicating erasure of coverage data is requested |
948 @param coverase flag indicating erasure of coverage data is requested |
949 @type bool |
949 @type bool |
950 @param syspath list of directories to be added to sys.path on the |
950 @param syspath list of directories to be added to sys.path on the |
951 remote side |
951 remote side |
952 @type list of str |
952 @type list of str |
953 """ |
953 @param workdir path name of the working directory |
954 self.__scriptName = os.path.abspath(fn) |
954 @type str |
955 |
955 @param discover flag indicating to discover the tests automatically |
956 fn = self.translate(os.path.abspath(fn), False) |
956 @type bool |
|
957 @param discoveryStart directory to start auto-discovery at |
|
958 @type str |
|
959 """ |
|
960 if fn: |
|
961 self.__scriptName = os.path.abspath(fn) |
|
962 |
|
963 fn = self.translate(os.path.abspath(fn), False) |
|
964 else: |
|
965 self.__scriptName = "unittest discover" |
|
966 |
957 self.__sendJsonCommand("RequestUTPrepare", { |
967 self.__sendJsonCommand("RequestUTPrepare", { |
958 "filename": fn, |
968 "filename": fn, |
959 "testname": tn, |
969 "testname": tn, |
960 "testfunctionname": tfn, |
970 "testfunctionname": tfn, |
961 "failed": failed, |
971 "failed": failed, |
962 "coverage": cov, |
972 "coverage": cov, |
963 "coveragefile": covname, |
973 "coveragefile": covname, |
964 "coverageerase": coverase, |
974 "coverageerase": coverase, |
965 "syspath": [] if syspath is None else syspath, |
975 "syspath": [] if syspath is None else syspath, |
|
976 "workdir": workdir, |
|
977 "discover": discover, |
|
978 "discoverystart": discoveryStart, |
966 }) |
979 }) |
967 |
980 |
968 def remoteUTRun(self): |
981 def remoteUTRun(self): |
969 """ |
982 """ |
970 Public method to start a unittest run. |
983 Public method to start a unittest run. |