>>> I need to try that again but, if I remember correctly, without the
>>> PYTHONPATH update it didn't work out for me.
>> Works for me ;-) A possible difference is that you stuffed ZODB/src at
>> the front of PYTHONPATH, but test.py appends ZODB/src to the end of
>> sys.path. If you have other ZODB or Zope code on sys.path (I never do
>> when I run ZODB tests), your way might be effective at "hiding" the
>> installed code from ZODB's test.py. I'm not sure.
>> Please figure out whether that's the case in the way you run this stuff.
>> If it is, ZODB's test.py could be changed to "prepend" ZODB/src instead.
> Still doesn't work.
AFAICT, everything you said after his demonstrated that "prepending" (as
opposed to appending) the path _did_ work for you. So I'll assume this is
> Here is the exact set of commands :
> [EMAIL PROTECTED] tmp]$ echo $PYTHONPATH
> [EMAIL PROTECTED] tmp]$ svn co
svn+ssh://[EMAIL PROTECTED]/repos/main/ZODB/trunk/ ZODB
> Checked out external at revision 40348.
> Checked out revision 40348.
> [EMAIL PROTECTED] tmp]$ cd ZODB/
> [EMAIL PROTECTED] ZODB]$ python setup.py build_ext -i
> [EMAIL PROTECTED] ZODB]$ python test.py -v
> Running tests from src
> Traceback (most recent call last):
> File "test.py", line 40, in ?
> from zope.testing import testrunner
> ImportError: cannot import name testrunner [EMAIL PROTECTED] ZODB]$
> Then if I'm adding the src dir within the PYTHONPATH it works :
> [EMAIL PROTECTED] ZODB]$ export PYTHONPATH=`pwd`/src
And this (effectively) prepends src/ to sys.path.
> [EMAIL PROTECTED] ZODB]$ echo $PYTHONPATH
> [EMAIL PROTECTED] ZODB]$ python test.py -v Running tests from src
> Running tests at level 1
> I found the problem on my box. Twisted is installed on my Python version
> and twisted requires zope.interface form Zope3 and this last was thus
> installed on test Python I'm using to launch the ZODB tests.
> within test.py the sys.path insertion looked like this one :
Yes, that's what my "test.py appends ZODB/src to the end of sys.path" meant.
> and then while looking for zope.testing.testrunner it couldn't be found
> since the zope.interface doesn't include it.
> I changed the test.py like below so that it append the src path first in
> the list of dir the interpretor should look at.
> sys.path.insert(0, path)
While that's what my "ZODB's test.py could be changed to "prepend" ZODB/src
instead" meant ;-)
> Checked in in rev 
Fine by me! Thanks.
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org