[Zope-Coders] Testing from an INSTANCE_HOME

Chris Withers chrisw@nipltd.com
Sat, 07 Jun 2003 15:38:44 +0100


Stefan H. Holek wrote:
> The goal of having Testing not touch INSTANCE_HOME can be achieved 
> without changing the "interface" of the Testing package (something I am 
> not overly happy with, think backward compatibility).

How so?

> Simply have Testing communicate the directory to Zope.App.startup() by 
> other means, say, an environment variable named TESTING_HOME. I have 
> tried this already and could provide code.

Please! Not another environment variable :-(

> It allows for great flexibility when writing integration and regression 
> tests. I can choose to run my tests against a preconfigured ZODB (and 
> even a ZEO server) simply by providing a custom custom_zodb.py. I'd 
> rather not lose that capability.

Well, I would imagine the Testing.app() thing would have a similar hook for you 
to replace the database it uses for testing...

cheers,

Chris