[Zope] ZopeTestCase and INSTANCE_HOME

zope at netchan.cotse.net zope at netchan.cotse.net
Thu Mar 4 15:25:15 EST 2004


Zope 2.7, ZTC 0.8.6

When framework.py imports the Testing package, INSTANCE_HOME is
overwritten. More precisely it happens in
lib/python/Testing/__init__.py:

----------------------------------------------------
cfg = App.config.getConfiguration()

# Set the INSTANCE_HOME to the Testing package directory
cfg.instancehome = os.path.dirname(__file__)

# Make sure this change is propogated to all the legacy locations for
# this information.
App.config.setConfiguration(cfg)
----------------------------------------------------

os.getenv("INSTANCE_HOME") will be
<zope_installation>/lib/python/Testing after this, regardless of its
original value.

Is there any way to prevent ZTC and/or the Testing package from doing
this? 

Regards,
Sandor








More information about the Zope mailing list