[Zope-dev] Testing changes break tests when Products are in INSTANCE_HOME
Chris Withers
chrisw@nipltd.com
Thu, 19 Sep 2002 15:00:56 +0100
Hi,
The changes made to bring the Testing package into play some while back appear
to have broken usage of testrunner.py to run tests if the products you're trying
to test are in an INSTANCE_HOME's Products directory.
If, for example, I do:
set ZOPE_HOME=D:\Zope\2.5.1\
set SOFTWARE_HOME=D:\Zope\2.5.1\lib\python
set INSTANCE_HOME=D:\Zope\cmf_dev\
set PYTHONPATH=D:\Zope\2.5.1\;D:\Zope\2.5.1\lib\python
set Z_DEBUG_MODE=1
D:\Zope\2.5.1\bin\python D:\Zope\2.5.1\utilities\testrunner.py -d
D:\zope\cmf_dev\products\cmfcore\ -v 1
(apologies for wrapping)
Then I get a myriad of import errors for things like Products.CMFCore.x.y
The reason for this is the that Testing sets it's own INSTANCE_HOME before Zope
is imported, so while testrunner.py is still happily finding tests wherever you
told it to, the INSTANCE_HOME is pointing to the Testing folder which, of
course, is missing all the products.
What should we do about this situation?
I've tried using PRODUCTS_PATH to get around this, but a few tests still seem to
fail when executed under that method :-(
cheers,
Chris