Debugger/DebuggerInterfacePython3.py

changeset 1499
b4d0457afb15
parent 1171
1ffefa5ca226
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1497:94f27ede4186 1499:b4d0457afb15
701 701
702 @param text the text to be completed (string) 702 @param text the text to be completed (string)
703 """ 703 """
704 self.__sendCommand("{0}{1}\n".format(DebugProtocol.RequestCompletion, text)) 704 self.__sendCommand("{0}{1}\n".format(DebugProtocol.RequestCompletion, text))
705 705
706 def remoteUTPrepare(self, fn, tn, tfn, cov, covname, coverase): 706 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase):
707 """ 707 """
708 Public method to prepare a new unittest run. 708 Public method to prepare a new unittest run.
709 709
710 @param fn the filename to load (string) 710 @param fn the filename to load (string)
711 @param tn the testname to load (string) 711 @param tn the testname to load (string)
712 @param tfn the test function name to load tests from (string) 712 @param tfn the test function name to load tests from (string)
713 @param cov flag indicating collection of coverage data is requested 713 @param failed list of failed test, if only failed test should be run
714 (list of strings)
715 @param cov flag indicating collection of coverage data is requested (boolean)
714 @param covname filename to be used to assemble the coverage caches 716 @param covname filename to be used to assemble the coverage caches
715 filename 717 filename (string)
716 @param coverase flag indicating erasure of coverage data is requested 718 @param coverase flag indicating erasure of coverage data is requested (boolean)
717 """ 719 """
718 self.__scriptName = os.path.abspath(fn) 720 self.__scriptName = os.path.abspath(fn)
719 721
720 fn = self.translate(os.path.abspath(fn), False) 722 fn = self.translate(os.path.abspath(fn), False)
721 self.__sendCommand('{0}{1}|{2}|{3}|{4:d}|{5}|{6:d}\n'.format( 723 self.__sendCommand('{0}{1}|{2}|{3}|{4}|{5:d}|{6}|{7:d}\n'.format(
722 DebugProtocol.RequestUTPrepare, fn, tn, tfn, cov, covname, coverase)) 724 DebugProtocol.RequestUTPrepare, fn, tn, tfn, str(failed),
725 cov, covname, coverase))
723 726
724 def remoteUTRun(self): 727 def remoteUTRun(self):
725 """ 728 """
726 Public method to start a unittest run. 729 Public method to start a unittest run.
727 """ 730 """
943 if resp == DebugProtocol.ResponseUTStopTest: 946 if resp == DebugProtocol.ResponseUTStopTest:
944 self.debugServer.clientUtStopTest() 947 self.debugServer.clientUtStopTest()
945 continue 948 continue
946 949
947 if resp == DebugProtocol.ResponseUTTestFailed: 950 if resp == DebugProtocol.ResponseUTTestFailed:
948 testname, traceback = eval(line[eoc:-1]) 951 testname, traceback, id = eval(line[eoc:-1])
949 self.debugServer.clientUtTestFailed(testname, traceback) 952 self.debugServer.clientUtTestFailed(testname, traceback, id)
950 continue 953 continue
951 954
952 if resp == DebugProtocol.ResponseUTTestErrored: 955 if resp == DebugProtocol.ResponseUTTestErrored:
953 testname, traceback = eval(line[eoc:-1]) 956 testname, traceback, id = eval(line[eoc:-1])
954 self.debugServer.clientUtTestErrored(testname, traceback) 957 self.debugServer.clientUtTestErrored(testname, traceback, id)
955 continue 958 continue
956 959
957 if resp == DebugProtocol.ResponseUTTestSkipped: 960 if resp == DebugProtocol.ResponseUTTestSkipped:
958 testname, reason = eval(line[eoc:-1]) 961 testname, reason, id = eval(line[eoc:-1])
959 self.debugServer.clientUtTestSkipped(testname, reason) 962 self.debugServer.clientUtTestSkipped(testname, reason, id)
960 continue 963 continue
961 964
962 if resp == DebugProtocol.ResponseUTTestFailedExpected: 965 if resp == DebugProtocol.ResponseUTTestFailedExpected:
963 testname, traceback = eval(line[eoc:-1]) 966 testname, traceback, id = eval(line[eoc:-1])
964 self.debugServer.clientUtTestFailedExpected(testname, traceback) 967 self.debugServer.clientUtTestFailedExpected(testname, traceback, id)
965 continue 968 continue
966 969
967 if resp == DebugProtocol.ResponseUTTestSucceededUnexpected: 970 if resp == DebugProtocol.ResponseUTTestSucceededUnexpected:
968 testname = line[eoc:-1] 971 testname, id = eval(line[eoc:-1])
969 self.debugServer.clientUtTestSucceededUnexpected(testname) 972 self.debugServer.clientUtTestSucceededUnexpected(testname, id)
970 continue 973 continue
971 974
972 if resp == DebugProtocol.ResponseUTFinished: 975 if resp == DebugProtocol.ResponseUTFinished:
973 self.debugServer.clientUtFinished() 976 self.debugServer.clientUtFinished()
974 continue 977 continue

eric ide

mercurial