eric6/UI/UserInterface.py

branch
maintenance
changeset 7117
4038dc8c58c9
parent 7051
a6dbc7c847cb
parent 7072
66ef92f769bf
child 7214
f434af227a41
equal deleted inserted replaced
7052:03b771405f5d 7117:4038dc8c58c9
4711 def __unittestProject(self): 4711 def __unittestProject(self):
4712 """ 4712 """
4713 Private slot for displaying the unittest dialog and run the current 4713 Private slot for displaying the unittest dialog and run the current
4714 project. 4714 project.
4715 """ 4715 """
4716 prog = None
4716 fn = self.project.getMainScript(True) 4717 fn = self.project.getMainScript(True)
4717 if fn: 4718 if fn:
4718 tfn = Utilities.getTestFileName(fn) 4719 tfn = Utilities.getTestFileName(fn)
4719 if os.path.exists(tfn): 4720 if os.path.exists(tfn):
4720 prog = tfn 4721 prog = tfn
4721 else: 4722 else:
4722 prog = fn 4723 prog = fn
4723 else:
4724 E5MessageBox.critical(
4725 self,
4726 self.tr("Unittest Project"),
4727 self.tr(
4728 "There is no main script defined for the"
4729 " current project. Aborting"))
4730 return
4731 4724
4732 self.__unittest() 4725 self.__unittest()
4733 self.unittestDialog.setProjectMode(True) 4726 self.unittestDialog.setProjectMode(True)
4734 self.unittestDialog.insertProg(prog) 4727 self.unittestDialog.insertProg(prog)
4735 self.utRestartAct.setEnabled(False) 4728 self.utRestartAct.setEnabled(False)

eric ide

mercurial