[ZODB-Dev] RE: RE: PersistentMapping

Julien Anguenot ja at nuxeo.com
Wed Nov 23 21:53:17 EST 2005


-----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 :

[anguenot at dhcp-401-3751 tmp]$ echo $PYTHONPATH

[anguenot at dhcp-401-3751 tmp]$ svn co
svn+ssh://anguenot@svn.zope.org/repos/main/ZODB/trunk/ ZODB

[...]

Checked out external at revision 40348.

Checked out revision 40348.
[anguenot at dhcp-401-3751 tmp]$ cd ZODB/
[anguenot at dhcp-401-3751 ZODB]$ python setup.py build_ext -i

[...]

[anguenot at dhcp-401-3751 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
[anguenot at dhcp-401-3751 ZODB]$

Then if I'm adding the src dir within the PYTHONPATH it works :

[anguenot at dhcp-401-3751 ZODB]$ export PYTHONPATH=`pwd`/src
[anguenot at dhcp-401-3751 ZODB]$ echo $PYTHONPATH
/tmp/ZODB/src
[anguenot at dhcp-401-3751 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-----


More information about the ZODB-Dev mailing list