67 the client side |
67 the client side |
68 @signal clientSyntaxError(exception) emitted after a syntax error has been |
68 @signal clientSyntaxError(exception) emitted after a syntax error has been |
69 detected on the client side |
69 detected on the client side |
70 @signal clientSignal(signal) emitted after a signal has been generated on |
70 @signal clientSignal(signal) emitted after a signal has been generated on |
71 the client side |
71 the client side |
72 @signal clientExit(int) emitted with the exit status after the client has |
72 @signal clientExit(int, str, bool) emitted after the client has exited |
73 exited |
73 giving the exit status, an exit message and an indication to be quiet |
74 @signal clientClearBreak(filename, lineno) emitted after the debug client |
74 @signal clientClearBreak(filename, lineno) emitted after the debug client |
75 has decided to clear a temporary breakpoint |
75 has decided to clear a temporary breakpoint |
76 @signal clientBreakConditionError(fn, lineno) emitted after the client has |
76 @signal clientBreakConditionError(fn, lineno) emitted after the client has |
77 signaled a syntax error in a breakpoint condition |
77 signaled a syntax error in a breakpoint condition |
78 @signal clientClearWatch(condition) emitted after the debug client |
78 @signal clientClearWatch(condition) emitted after the debug client |
134 clientVariable = pyqtSignal(int, list) |
134 clientVariable = pyqtSignal(int, list) |
135 clientStatement = pyqtSignal(bool) |
135 clientStatement = pyqtSignal(bool) |
136 clientException = pyqtSignal(str, str, list) |
136 clientException = pyqtSignal(str, str, list) |
137 clientSyntaxError = pyqtSignal(str, str, int, int) |
137 clientSyntaxError = pyqtSignal(str, str, int, int) |
138 clientSignal = pyqtSignal(str, str, int, str, str) |
138 clientSignal = pyqtSignal(str, str, int, str, str) |
139 clientExit = pyqtSignal(int, str) |
139 clientExit = pyqtSignal(int, str, bool) |
140 clientBreakConditionError = pyqtSignal(str, int) |
140 clientBreakConditionError = pyqtSignal(str, int) |
141 clientWatchConditionError = pyqtSignal(str) |
141 clientWatchConditionError = pyqtSignal(str) |
142 clientRawInput = pyqtSignal(str, bool) |
142 clientRawInput = pyqtSignal(str, bool) |
143 clientBanner = pyqtSignal(str, str, str, str) |
143 clientBanner = pyqtSignal(str, str, str, str) |
144 clientCapabilities = pyqtSignal(int, str, str) |
144 clientCapabilities = pyqtSignal(int, str, str) |
1357 syspath, workdir, discoveryStart) |
1357 syspath, workdir, discoveryStart) |
1358 |
1358 |
1359 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, |
1359 def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase, |
1360 clientType="", forProject=False, venvName="", |
1360 clientType="", forProject=False, venvName="", |
1361 syspath=None, workdir="", discover=False, |
1361 syspath=None, workdir="", discover=False, |
1362 discoveryStart="", testCases=None): |
1362 discoveryStart="", testCases=None, debug=False): |
1363 """ |
1363 """ |
1364 Public method to prepare a new unittest run. |
1364 Public method to prepare a new unittest run. |
1365 |
1365 |
1366 @param fn the filename to load |
1366 @param fn the filename to load |
1367 @type str |
1367 @type str |
1393 @type bool |
1393 @type bool |
1394 @param discoveryStart directory to start auto-discovery at |
1394 @param discoveryStart directory to start auto-discovery at |
1395 @type str |
1395 @type str |
1396 @param testCases list of test cases to be loaded |
1396 @param testCases list of test cases to be loaded |
1397 @type list of str |
1397 @type list of str |
|
1398 @param debug flag indicating to run unittest with debugging |
|
1399 @type bool |
1398 """ |
1400 """ |
1399 if clientType and clientType not in self.getSupportedLanguages(): |
1401 if clientType and clientType not in self.getSupportedLanguages(): |
1400 # a not supported client language was requested |
1402 # a not supported client language was requested |
1401 E5MessageBox.critical( |
1403 E5MessageBox.critical( |
1402 None, |
1404 None, |
1418 self.__setClientType('Python3') # assume it is a Python3 file |
1420 self.__setClientType('Python3') # assume it is a Python3 file |
1419 self.startClient(False, forProject=forProject, venvName=venvName) |
1421 self.startClient(False, forProject=forProject, venvName=venvName) |
1420 |
1422 |
1421 self.debuggerInterface.remoteUTPrepare( |
1423 self.debuggerInterface.remoteUTPrepare( |
1422 fn, tn, tfn, failed, cov, covname, coverase, syspath, workdir, |
1424 fn, tn, tfn, failed, cov, covname, coverase, syspath, workdir, |
1423 discover, discoveryStart, testCases) |
1425 discover, discoveryStart, testCases, debug) |
1424 self.debugging = False |
|
1425 self.running = True |
1426 self.running = True |
1426 |
1427 self.debugging = debug |
1427 def remoteUTRun(self): |
1428 if debug: |
|
1429 self.__restoreBreakpoints() |
|
1430 self.__restoreWatchpoints() |
|
1431 |
|
1432 def remoteUTRun(self, debug=False, failfast=False): |
1428 """ |
1433 """ |
1429 Public method to start a unittest run. |
1434 Public method to start a unittest run. |
1430 """ |
1435 |
1431 self.debuggerInterface.remoteUTRun() |
1436 @param debug flag indicating to run unittest with debugging |
|
1437 @type bool |
|
1438 @param failfast flag indicating to stop at the first error |
|
1439 @type bool |
|
1440 """ |
|
1441 self.debuggerInterface.remoteUTRun(debug, failfast) |
1432 |
1442 |
1433 def remoteUTStop(self): |
1443 def remoteUTStop(self): |
1434 """ |
1444 """ |
1435 public method to stop a unittest run. |
1445 public method to stop a unittest run. |
1436 """ |
1446 """ |
1565 @param message message sent with the exit |
1575 @param message message sent with the exit |
1566 @type str |
1576 @type str |
1567 """ |
1577 """ |
1568 if self.passive: |
1578 if self.passive: |
1569 self.__passiveShutDown() |
1579 self.__passiveShutDown() |
1570 self.clientExit.emit(int(status), message) |
1580 self.clientExit.emit(int(status), message, False) |
1571 if Preferences.getDebugger("AutomaticReset") or (self.running and |
1581 if Preferences.getDebugger("AutomaticReset") or (self.running and |
1572 not self.debugging): |
1582 not self.debugging): |
1573 self.debugging = False |
1583 self.debugging = False |
1574 self.startClient(False, forProject=self.__forProject) |
1584 self.startClient(False, forProject=self.__forProject) |
1575 if self.passive: |
1585 if self.passive: |
1765 @param testname name of the test (string) |
1775 @param testname name of the test (string) |
1766 @param testId id of the test (string) |
1776 @param testId id of the test (string) |
1767 """ |
1777 """ |
1768 self.utTestSucceededUnexpected.emit(testname, testId) |
1778 self.utTestSucceededUnexpected.emit(testname, testId) |
1769 |
1779 |
1770 def clientUtFinished(self): |
1780 def clientUtFinished(self, status): |
1771 """ |
1781 """ |
1772 Public method to process the client unit test finished info. |
1782 Public method to process the client unit test finished info. |
|
1783 |
|
1784 @param status exit status of the unit test |
|
1785 @type int |
1773 """ |
1786 """ |
1774 self.utFinished.emit() |
1787 self.utFinished.emit() |
|
1788 |
|
1789 self.clientExit.emit(int(status), "", True) |
|
1790 self.debugging = False |
|
1791 self.running = False |
1775 |
1792 |
1776 def passiveStartUp(self, fn, exc): |
1793 def passiveStartUp(self, fn, exc): |
1777 """ |
1794 """ |
1778 Public method to handle a passive debug connection. |
1795 Public method to handle a passive debug connection. |
1779 |
1796 |