[Eric] unittest function from menu gives error,
where commandline does not.
Detlev Offenbach
detlev at die-offenbachs.de
Sun Dec 23 09:23:43 GMT 2007
Hi,
in the code "sys.path.append('../utils')" you add a relative path. For this to
work you have to ensure, that the correct working path is entered in the
dialog, that pops up, when you start your script from within eric.
Detlev
On Sonntag, 23. Dezember 2007, A.J. Bonnema wrote:
> Hi all,
>
> First of all, I would like to appologize for this sequence of questions.
> I just started doing Python and Eric. I am afraid it will not be the
> last one. If I can not find an answer through google or the docs, I will
> ask the list. The available docs for Python are very complete, so most
> of my questions are about Eric. Again, sorry about that.
>
> Now, I have a program for which I have a small testprogram. I can call
> the testprogram from the command line and it displays the results as
> expected. However, the dialog from the menu option "unittest" gives me
> an error message: "Unable to run unittest: No module names utils.
>
> The module this message refers to, is module in a different directory,
> for which I added to the python path as follows:
>
> sys.path.append('../utils')
>
> I included this line into the file being tested.
>
> Again, using the commandline from the directory the testprogram is in,
> I can do the unittest.
>
> Anyone, any idea what might be wrong?
>
> Guus.
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the Eric
mailing list