eric7/Unittest/UnittestWidget.py

branch
unittest
changeset 9063
f1d7dd7ae471
parent 9062
7f27bf3b50c3
child 9064
339bb8c8007d
diff -r 7f27bf3b50c3 -r f1d7dd7ae471 eric7/Unittest/UnittestWidget.py
--- a/eric7/Unittest/UnittestWidget.py	Fri May 13 17:23:21 2022 +0200
+++ b/eric7/Unittest/UnittestWidget.py	Sat May 14 18:56:52 2022 +0200
@@ -68,6 +68,7 @@
         self.setupUi(self)
         
         self.__resultsModel = TestResultsModel(self)
+        self.__resultsModel.summary.connect(self.__setStatusLabel)
         self.__resultsTree = TestResultsTreeView(self)
         self.__resultsTree.setModel(self.__resultsModel)
         self.resultsGroupBox.layout().addWidget(self.__resultsTree)
@@ -688,7 +689,8 @@
         @param result test result object
         @type UTTestResult
         """
-        self.__runCount += 1
+        if not result.subtestResult:
+            self.__runCount += 1
         self.__updateProgress()
         
         self.__resultsModel.updateTestResults([result])
@@ -745,6 +747,16 @@
         self.__coverageFile = coverageFile
         
         # TODO: implement the handling of the 'Show Coverage' button
+    
+    @pyqtSlot(str)
+    def __setStatusLabel(self, statusText):
+        """
+        Private slot to set the status label to the text sent by the model.
+        
+        @param statusText text to be shown
+        @type str
+        """
+        self.statusLabel.setText(f"<b>{statusText}</b>")
 
 
 class UnittestWindow(EricMainWindow):

eric ide

mercurial