[Zope3-dev] bin/test import problem
Nicholas Wieland
nicholas at segec.it
Wed Jun 9 11:31:58 EDT 2004
Hi *,
I'm playing with Zope 3 beta 1 on FreeBSD 5.2.1 and I have a strange
problem with imports when I run tests.
My package is under Zope/lib/python/blog (where Zope is my instance home)
with a regular __init__.py inside.
The structure is quite simple
blog/
__init__.py
configure.zcml
interfaces.py
blog.py
entry.py
tests/
test_*
views/
...
Inside entry.py (for example) I have "from blog.interfaces import
IEntry" and bin/test returns an ImportError.
Error in test Invalid Test (blog.tests.test_entry)
Traceback (most recent call last):
File
"/usr/home/nicholas/ZopeX3-3.0.0b1/build/lib.freebsd-5.2.1-RELEASE-p3-i386-2.3/zope/app/tests/test.py",
line 625, in get_suite
mod = package_import(modname)
File
"/usr/home/nicholas/ZopeX3-3.0.0b1/build/lib.freebsd-5.2.1-RELEASE-p3-i386-2.3/zope/app/tests/test.py",
line 601, in package_import
__import__(modname)
File "/usr/home/nicholas/Zope/lib/python/blog/tests/test_entry.py",
line 7, in ?
from blog.entry import Entry
File "/usr/home/nicholas/Zope/lib/python/blog/entry.py", line 5, in ?
from blog.interfaces import IEntry
ImportError: No module named interfaces
If I simply import IEntry ("from interfaces import IEntry") everything
works.
Is this correct ?
I'm quite new to Zope3 so I'm not sure about what to do.
TIA,
ngw
More information about the Zope3-dev
mailing list