PyUnit/UnittestDialog.py

changeset 6904
3f35037a08d4
parent 6902
67d0ad66b59a
child 6905
889339ffe6cf
diff -r 0d4e1033731b -r 3f35037a08d4 PyUnit/UnittestDialog.py
--- a/PyUnit/UnittestDialog.py	Tue Mar 26 19:39:42 2019 +0100
+++ b/PyUnit/UnittestDialog.py	Wed Mar 27 20:09:37 2019 +0100
@@ -119,6 +119,8 @@
         if dbs:
             self.ui = ui
             
+            self.debuggerCheckBox.setChecked(True)
+            
             # virtual environment manager is only used in the integrated
             # variant
             self.__venvManager = e5App().getObject("VirtualEnvManager")
@@ -131,6 +133,7 @@
                 self.__populateVenvComboBox)
         else:
             self.__venvManager = None
+            self.debuggerCheckBox.setVisible(False)
         self.venvComboBox.setVisible(bool(self.__venvManager))
         self.venvLabel.setVisible(bool(self.__venvManager))
         
@@ -570,7 +573,7 @@
     
     def __UTDiscovered(self, testCases, exc_type, exc_value):
         """
-        Private slot to handle the utPrepared signal.
+        Private slot to handle the utDiscovered signal.
         
         If the unittest suite was loaded successfully, we ask the
         client to run the test suite.
@@ -721,7 +724,7 @@
                 forProject=self.__forProject, workdir=workdir,
                 venvName=venvName, syspath=sysPath,
                 discover=discover, discoveryStart=discoveryStart,
-                testCases=testCases)
+                testCases=testCases, debug=self.debuggerCheckBox.isChecked())
         else:
             # we are running as an application
             if discover and not discoveryStart:
@@ -811,7 +814,8 @@
             else:
                 cover = None
             
-            self.testResult = QtTestResult(self)
+            self.testResult = QtTestResult(
+                self, self.failfastCheckBox.isChecked())
             self.totalTests = test.countTestCases()
             self.__failedTests = []
             self.__setRunningMode()
@@ -849,7 +853,8 @@
         
         self.totalTests = nrTests
         self.__setRunningMode()
-        self.__dbs.remoteUTRun()
+        self.__dbs.remoteUTRun(debug=self.debuggerCheckBox.isChecked(),
+                               failfast=self.failfastCheckBox.isChecked())
     
     @pyqtSlot()
     def __stopTests(self):
@@ -947,6 +952,9 @@
         self.progressLed.off()
         
         self.unittestStopped.emit()
+        
+        self.raise_()
+        self.activateWindow()
     
     def testFailed(self, test, exc, testId):
         """
@@ -1162,14 +1170,18 @@
     
     For more details see pyunit.py of the standard Python distribution.
     """
-    def __init__(self, parent):
+    def __init__(self, parent, failfast):
         """
         Constructor
         
-        @param parent The parent widget.
+        @param parent reference to the parent widget
+        @type UnittestDialog
+        @param failfast flag indicating to stop at the first error
+        @type bool
         """
         super(QtTestResult, self).__init__()
         self.parent = parent
+        self.failfast = failfast
     
     def addFailure(self, test, err):
         """

eric ide

mercurial