diff -r 5ac83a87954d -r 3d14633f6261 src/eric7/Testing/TestingWidget.py --- 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()