src/eric7/Testing/TestingWidget.py

branch
eric7
changeset 10421
3d14633f6261
parent 10415
af9a6dac2611
child 10424
1a64ad8acf9d
equal deleted inserted replaced
10420:5ac83a87954d 10421:3d14633f6261
368 @param history array containing the history 368 @param history array containing the history
369 @type list of str 369 @type list of str
370 @param item item to be inserted 370 @param item item to be inserted
371 @type str 371 @type str
372 """ 372 """
373 # prepend the given directory to the discovery picker 373 if history and item != history[0]:
374 if item is None: 374 # prepend the given directory to the given widget
375 item = "" 375 if item is None:
376 if item in history: 376 item = ""
377 history.remove(item) 377 if item in history:
378 history.insert(0, item) 378 history.remove(item)
379 widget.clear() 379 history.insert(0, item)
380 widget.addItems(history) 380 widget.clear()
381 widget.setEditText(item) 381 widget.addItems(history)
382 widget.setEditText(item)
382 383
383 @pyqtSlot(str) 384 @pyqtSlot(str)
384 def __insertDiscovery(self, start): 385 def __insertDiscovery(self, start):
385 """ 386 """
386 Private slot to insert the discovery start directory into the 387 Private slot to insert the discovery start directory into the
925 926
926 environment = self.venvComboBox.currentText() 927 environment = self.venvComboBox.currentText()
927 framework = self.frameworkComboBox.currentText() 928 framework = self.frameworkComboBox.currentText()
928 929
929 discoveryStart = self.discoveryPicker.currentText() 930 discoveryStart = self.discoveryPicker.currentText()
931 if discoveryStart:
932 self.__insertDiscovery(discoveryStart)
930 933
931 self.sbLabel.setText(self.tr("Discovering Tests")) 934 self.sbLabel.setText(self.tr("Discovering Tests"))
932 QCoreApplication.processEvents() 935 QCoreApplication.processEvents()
933 936
934 interpreter = self.__determineInterpreter(environment) 937 interpreter = self.__determineInterpreter(environment)

eric ide

mercurial