Hi,

Yes, what was changed is that it tries to import the module in an
absolute way (before it always made relative imports, which would make
things fail in other ways -- I'll see if I can make it work in a way
that supports both scenarios).

You can fix it by:

- having __init__.py in your test modules (so that it becomes a valid
python package and can be properly imported)
- changing /org.python.pydev.debug/pysrc/runfiles.py at line 255 (in
the method __adjust_path): change sys.path.append(path_to_append) to
sys.path.insert(0, path_to_append)

Cheers,

Fabio

On Thu, Jul 23, 2009 at 10:32 AM, Kenneth Loafman<kenn...@loafman.com> wrote:
> Under 1.4.6 of Pydev, all of my Python Unittest configurations worked.
> Under 1.4.7, they do not.  I have not changed the setup, and the
> unittests work from the commandline when running from the testing
> directory.  The Unittest configuration is set up to have the working
> directory at ${workspace_loc:duplicity-src/testing}, same as 1.4.6.
>
> ------
> pydev debugger: starting
> Finding files...
> ['/home/ken/workspace/duplicity-src/testing/finaltest.py'] ... done
> Importing test modules ... Traceback (most recent call last):
>  File
> "/home/ken/eclipse3.4/plugins/org.python.pydev.debug_1.4.7.2843/pysrc/runfiles.py",
> line 331, in __get_module_from_str
>    mod = __import__(modname)
> ImportError: No module named testing.finaltest
> ERROR: Module: testing.finaltest could not be imported.
> done.
> ------
>
> It should be importing finaltest, not testing.finaltest.
>
> It appears to me that Pydev is doing something different with the import
> and the CWD.  Can you suggest a workaround for this?
>
> ...Thanks,
> ...Ken
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Pydev-users mailing list
> Pydev-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pydev-users
>

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to