eric7/Unittest/UnittestWidget.py

branch
unittest
changeset 9063
f1d7dd7ae471
parent 9062
7f27bf3b50c3
child 9064
339bb8c8007d
equal deleted inserted replaced
9062:7f27bf3b50c3 9063:f1d7dd7ae471
66 """ 66 """
67 super().__init__(parent) 67 super().__init__(parent)
68 self.setupUi(self) 68 self.setupUi(self)
69 69
70 self.__resultsModel = TestResultsModel(self) 70 self.__resultsModel = TestResultsModel(self)
71 self.__resultsModel.summary.connect(self.__setStatusLabel)
71 self.__resultsTree = TestResultsTreeView(self) 72 self.__resultsTree = TestResultsTreeView(self)
72 self.__resultsTree.setModel(self.__resultsModel) 73 self.__resultsTree.setModel(self.__resultsModel)
73 self.resultsGroupBox.layout().addWidget(self.__resultsTree) 74 self.resultsGroupBox.layout().addWidget(self.__resultsTree)
74 75
75 self.versionsButton.setIcon( 76 self.versionsButton.setIcon(
686 Private slot to handle the receipt of a test result object. 687 Private slot to handle the receipt of a test result object.
687 688
688 @param result test result object 689 @param result test result object
689 @type UTTestResult 690 @type UTTestResult
690 """ 691 """
691 self.__runCount += 1 692 if not result.subtestResult:
693 self.__runCount += 1
692 self.__updateProgress() 694 self.__updateProgress()
693 695
694 self.__resultsModel.updateTestResults([result]) 696 self.__resultsModel.updateTestResults([result])
695 697
696 @pyqtSlot(list, str) 698 @pyqtSlot(list, str)
743 @type str 745 @type str
744 """ 746 """
745 self.__coverageFile = coverageFile 747 self.__coverageFile = coverageFile
746 748
747 # TODO: implement the handling of the 'Show Coverage' button 749 # TODO: implement the handling of the 'Show Coverage' button
750
751 @pyqtSlot(str)
752 def __setStatusLabel(self, statusText):
753 """
754 Private slot to set the status label to the text sent by the model.
755
756 @param statusText text to be shown
757 @type str
758 """
759 self.statusLabel.setText(f"<b>{statusText}</b>")
748 760
749 761
750 class UnittestWindow(EricMainWindow): 762 class UnittestWindow(EricMainWindow):
751 """ 763 """
752 Main window class for the standalone dialog. 764 Main window class for the standalone dialog.

eric ide

mercurial