-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tim,

Tim Peters wrote:
> 
>> 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. 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
[EMAIL PROTECTED] ZODB]$ echo $PYTHONPATH
/tmp/ZODB/src
[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 :

sys.path.append(src)

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)

Checked in in rev [40349]

Cheers,

        J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDhSscGhoG8MxZ/pIRAoFmAJwOdMZTXlMFWH6VcffvXsGuiV9X8gCaAgli
hfZhupidLC+vSAwHnaai60A=
=jSm7
-----END PGP SIGNATURE-----
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to