[TIP] Testing from sandbox in the presence of installed versions

holger krekel holger at merlinux.eu
Sat Jan 22 10:46:42 PST 2011


On Sat, Jan 22, 2011 at 12:02 -0600, skip at pobox.com wrote:
> 
>     holger> could you post or point to a paste-service-URL-provided full
>     holger> session log including your actual invocation and working
>     holger> directory?
> 
> http://dpaste.org/iSqI/ (lightly edited script command output)

Ok, the log shows nosetests coming from your global environment and thus all
subsequent invocations/import look ups happen there, i guess.  You need to make
sure nosetests is actually installed in the virtual environment, like this:

    [testenv]
    deps=nose
    commands=nosetests

Can you retry and send the log? 

sidenote: tox generally prints the cmdline invocations it does so you
should be able to re-produce things on the command line and 
poke around to discover whats going on.

cheers,
holger
 

> I think I'm closing in on the problem, actually, multiple problems:
> 
>     * One of the things the test suite does is start up servers to
>       communicate with.  Those test programs are executable and start with
>       the usual "#! /usr/bin/env python" line.  They are thus started with
>       Python 2.7 instead of, in this case, Python 2.5.
>
>     * I have used easy_install to install a bunch of things on my system.
>       Those installed packages are thus at the start of sys.path.  I got rid
>       of easy_install's sys.path munging.  That changed the errors.  Now it
>       can't find sb_server.py even though tox installed one when it built
>       the virtualenv:
> 
>         % find . -name sb_server.py | xargs ls -l
>         -rwxrwxr-x  1 skip  staff  44420 Jan 22 11:58 ./.tox/py25/bin/sb_server.py
>         -rw-rw-r--  1 skip  staff  44376 Dec  6  2008 ./scripts/sb_server.py
>         -rw-r--r--  1 skip  staff  44792 Dec  4  2008 ./thunderbayes/spambayes/sb_server.py
> 
> Skip
> 

-- 



More information about the testing-in-python mailing list