Fixed an issue in the unittest dialog causing it to fail, if coverage was selected in local mode for an open project but no main script defined. 5_3_x

Fri, 31 May 2013 10:47:48 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 31 May 2013 10:47:48 +0200
branch
5_3_x
changeset 2682
a9bbf0326427
parent 2676
1638771366c2
child 2687
33a848c5e46f

Fixed an issue in the unittest dialog causing it to fail, if coverage was selected in local mode for an open project but no main script defined.
(grafted from e793289c43622cea1ee0c8743da55378979ec22e)

PyUnit/UnittestDialog.py file | annotate | diff | comparison | revisions
--- a/PyUnit/UnittestDialog.py	Tue May 28 17:48:35 2013 +0200
+++ b/PyUnit/UnittestDialog.py	Fri May 31 10:47:48 2013 +0200
@@ -335,6 +335,8 @@
                     project = e5App().getObject("Project")
                     if project.isOpen() and project.isProjectSource(prog):
                         mainScript = project.getMainScript(True)
+                        if not mainScript:
+                            mainScript = os.path.abspath(prog)
                     else:
                         mainScript = os.path.abspath(prog)
                 else:

eric ide

mercurial