When I try to run unit testing on RichDocuments, I get an error:
[jd@jd:~/sandbox/trunk/eggs/Products.RichDocument-3.0.2-py2.4.egg/Products/RichDocument/tests]$ python ./testSetup.py
Traceback (most recent call last):
File "./testSetup.py", line 1, in ?
from Products.RichDocument.tests import base
ImportError: No module named RichDocument.tests
1) Does this have to do with my python path?
2) I saw here it says: you may have to set the environment variables INSTANCE_HOME and SOFTWARE_HOME. The former should point to your Zope instance (the parent of your Products folder), the latter should point to the python library directory where Zope is installed, e.g. /usr/local/zope-2.8.4/lib/python.
How do I set this up? In http://localhost:8380/manage‘s control panel, it says:
SOFTWARE_HOME
/home/jd/sandbox/trunk/parts/zope2/lib/python
INSTANCE_HOME
/home/jd/sandbox/trunk/parts/client
Are you using Buildout? (If not, why not?)
If you are, make sure you have a testrunner section:
Now you can run tests via:
bin/test -s PACKAGEand your path will be set correctly