eric6/UI/UserInterface.py

branch
micropython
changeset 7119
5f609e77de99
parent 7089
9f9816b19aa4
parent 7072
66ef92f769bf
child 7134
21d23ca51680
equal deleted inserted replaced
7116:233b6e62ca2b 7119:5f609e77de99
4762 def __unittestProject(self): 4762 def __unittestProject(self):
4763 """ 4763 """
4764 Private slot for displaying the unittest dialog and run the current 4764 Private slot for displaying the unittest dialog and run the current
4765 project. 4765 project.
4766 """ 4766 """
4767 prog = None
4767 fn = self.project.getMainScript(True) 4768 fn = self.project.getMainScript(True)
4768 if fn: 4769 if fn:
4769 tfn = Utilities.getTestFileName(fn) 4770 tfn = Utilities.getTestFileName(fn)
4770 if os.path.exists(tfn): 4771 if os.path.exists(tfn):
4771 prog = tfn 4772 prog = tfn
4772 else: 4773 else:
4773 prog = fn 4774 prog = fn
4774 else:
4775 E5MessageBox.critical(
4776 self,
4777 self.tr("Unittest Project"),
4778 self.tr(
4779 "There is no main script defined for the"
4780 " current project. Aborting"))
4781 return
4782 4775
4783 self.__unittest() 4776 self.__unittest()
4784 self.unittestDialog.setProjectMode(True) 4777 self.unittestDialog.setProjectMode(True)
4785 self.unittestDialog.insertProg(prog) 4778 self.unittestDialog.insertProg(prog)
4786 self.utRestartAct.setEnabled(False) 4779 self.utRestartAct.setEnabled(False)

eric ide

mercurial