[Zope-Coders] Re: testrunner.py change

Shane Hathaway shane@zope.com
Tue, 07 May 2002 11:20:57 -0400


Chris Withers wrote:
> Hi Shane,
> 
> Your commit to testrunner.py (1.23) meant that the Testing package is always imported.
> 
> I can't really follow the reasoning for this, perhaps you can explain?

If I recall correctly, it makes it so "import Zope" in the various test 
modules can work.

> It's causing me problems as I run Squishdot's tests with Squishdot checked out into an
> INSTANCE_HOME. Of course, now the INSTANCE_HOME in the environment gets overidden by the
> one in Testing's __init__.py, so the tests fail when they try and import any of the
> Squishdot modules.
> 
> How should I solve this?

Don't use an INSTANCE_HOME? :-)

I'm not going to get involved in this.  But if you want to get your 
hands dirty, first add code to Zope/__init__.py that detects exceptions 
that prints them.  Most exceptions that occur in Zope/__init__.py never 
get shown, you see, so you have to use special code to make them 
visible.  Then change things around as you see fit and see if you have 
found a better way to make testrunner work.

Shane