src/eric7/Testing/TestingWidget.py

branch
eric7
changeset 10421
3d14633f6261
parent 10415
af9a6dac2611
child 10424
1a64ad8acf9d
--- a/src/eric7/Testing/TestingWidget.py	Mon Dec 18 17:45:20 2023 +0100
+++ b/src/eric7/Testing/TestingWidget.py	Tue Dec 19 09:31:02 2023 +0100
@@ -370,15 +370,16 @@
         @param item item to be inserted
         @type str
         """
-        # prepend the given directory to the discovery picker
-        if item is None:
-            item = ""
-        if item in history:
-            history.remove(item)
-        history.insert(0, item)
-        widget.clear()
-        widget.addItems(history)
-        widget.setEditText(item)
+        if history and item != history[0]:
+            # prepend the given directory to the given widget
+            if item is None:
+                item = ""
+            if item in history:
+                history.remove(item)
+            history.insert(0, item)
+            widget.clear()
+            widget.addItems(history)
+            widget.setEditText(item)
 
     @pyqtSlot(str)
     def __insertDiscovery(self, start):
@@ -927,6 +928,8 @@
         framework = self.frameworkComboBox.currentText()
 
         discoveryStart = self.discoveryPicker.currentText()
+        if discoveryStart:
+            self.__insertDiscovery(discoveryStart)
 
         self.sbLabel.setText(self.tr("Discovering Tests"))
         QCoreApplication.processEvents()

eric ide

mercurial