[Zope-Coders] Testing from an INSTANCE_HOME
Chris Withers
chrisw@nipltd.com
Tue, 10 Jun 2003 13:36:21 +0100
Stefan H. Holek wrote:
> I have shipped tests to customers. I have no way of "upgrading" those
> tests after the fact.
You can ship them patches.
>>> 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 :-(
>
> Well, this one would be secret of course ;-).
NO!
>> Well, I would imagine the Testing.app() thing would have a similar
>> hook for you to replace the database it uses for testing...
>
> Would this then make Testing simpler or just different?
For you, different. For everyone else, much simpler.
> In Zope 2.7 the testrunner could learn a new command line switch: -C
> configfile
> (I have to thank Shane for gently pushing me towards this idea)
That would be cool :-)
> We could then run tests like so:
>
> python /Zope/utilities/testrunner.py -qd . -C /home/zope/etc/zope.conf
>
> This seems pretty neat and dobale with little changes to Testing,
> App.FindHomes, and Zope.App.startup.
*nods*
> For Zope 2.6 I see two options:
>
> - Stop Testing from changing INSTANCE_HOME so people can at least run tests
> after setting the INSTANCE_HOME environment variable.
I'd go for this.
> Note that you can
> already do this with ZopeTestCase.
What is ZopeTestCase?
Chris