Debugger/DebuggerInterfacePython3.py

branch
jsonrpc
changeset 5125
eb1b3e0577e4
parent 5124
1ba8ee313b57
child 5128
b6cbdba69967
--- a/Debugger/DebuggerInterfacePython3.py	Thu Sep 01 19:00:46 2016 +0200
+++ b/Debugger/DebuggerInterfacePython3.py	Thu Sep 01 20:03:50 2016 +0200
@@ -867,9 +867,18 @@
         self.__scriptName = os.path.abspath(fn)
         
         fn = self.translate(os.path.abspath(fn), False)
-        self.__sendCommand('{0}{1}|{2}|{3}|{4}|{5:d}|{6}|{7:d}\n'.format(
-            DebugProtocol.RequestUTPrepare, fn, tn, tfn, str(failed),
-            cov, covname, coverase))
+##        self.__sendCommand('{0}{1}|{2}|{3}|{4}|{5:d}|{6}|{7:d}\n'.format(
+##            DebugProtocol.RequestUTPrepare, fn, tn, tfn, str(failed),
+##            cov, covname, coverase))
+        self.__sendJsonCommand("RequestUTPrepare", {
+            "filename": fn,
+            "testname": tn,
+            "testfunctionname": tfn,
+            "failed": failed,
+            "coverage": cov,
+            "coveragefile": covname,
+            "coverageerase": coverase,
+        })
     
     def remoteUTRun(self):
         """
@@ -1110,11 +1119,11 @@
 ##                    self.debugServer.passiveStartUp(fn, exc)
 ##                    continue
 ##                
-                if resp == DebugProtocol.ResponseUTPrepared:
-                    res, exc_type, exc_value = eval(line[eoc:-1])
-                    self.debugServer.clientUtPrepared(res, exc_type, exc_value)
-                    continue
-                
+##                if resp == DebugProtocol.ResponseUTPrepared:
+##                    res, exc_type, exc_value = eval(line[eoc:-1])
+##                    self.debugServer.clientUtPrepared(res, exc_type, exc_value)
+##                    continue
+##                
                 if resp == DebugProtocol.ResponseUTStartTest:
                     testname, doc = eval(line[eoc:-1])
                     self.debugServer.clientUtStartTest(testname, doc)
@@ -1315,11 +1324,14 @@
             return
         
         if method == "ResponseCompletion":
-##                    clstring, text = line[eoc:-1].split('||')
-##                    cl = eval(clstring)
             self.debugServer.signalClientCompletionList(
                 params["completions"], params["text"])
             return
+        
+        if method == "ResponseUTPrepared":
+            self.debugServer.clientUtPrepared(
+                params["count"], params["exception"], params["message"])
+            return
     
     def __sendCommand(self, cmd):
         """

eric ide

mercurial