bobber6467 / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

import name collision #250

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have a large collection of tests and I am trying to convert from running
them with Proctor to nose.  The current roadblock I have is that something
about the way nose imports my libraries causes name collisions between
modules with the same name that appear in different parts of the library.

If I run:

$ nosetests myapp/package1/testfile.py

the tests in that single file run without error.

However, when I run:

$ nosetests myapp/package1

and a module in myapp.package1 imports 'uuid' it gets a version in
myapp.lib.uuid instead of the standard library version.

This problem is in version 0.10.4 installed via pip.

Proctor doesn't have this problem, so I would be happy to work with you to
figure out what is different about the import logic.  I'd love to have
access to some of the plugins available for nose!

Original issue reported on code.google.com by doug.hel...@gmail.com on 16 Apr 2009 at 3:30

GoogleCodeExporter commented 8 years ago
This sounds like nose's attempts to help get locally interesting dirs on 
sys.path are not helping you. Have you 
tried with the -P (--no-path-adjustment) switch? That should shut all of that 
off. Unfortunately there's no finer-
grained control over path additions at this point. That would be a useful 
plugin hook for 1.0.

Original comment by jpelle...@gmail.com on 17 Apr 2009 at 12:18

GoogleCodeExporter commented 8 years ago
Using -P fixed the problem. Thanks!

Original comment by doug.hel...@gmail.com on 17 Apr 2009 at 4:25