[Zope-Coders] zLOG warnings and testrunner

Jim Fulton jim@zope.com
Thu, 27 Sep 2001 10:38:45 -0400


Jeremy Hylton wrote:
> 
> >>>>> "CMcD" == Chris McDonough <chrism@digicool.com> writes:
> 
>   CMcD> Jeremy, you might try setting a STUPID_LOG_FILE envvar (no Im
>   CMcD> not kidding) to a file, rerun the tests, and see what happens.
>   CMcD> I have no idea why pyunit is choking on Zope log calls,
>   CMcD> especially because by default nothing actually makes its way
>   CMcD> out of Zope without STUPID_LOG_FILE set.
> 
> The Zope Testing.common module installs a log handler that raises an
> AssertionError when a warning or higher is logged.  So it's the policy
> of the Zope testing framework, but I've no idea why :-).

It's done beause many errors are logged rather than raised
and indicate failure. This is an important and valuable feature.

I suggest that we make the default log/est threashold "ERROR"
and provide an testing API for lowering it.

Jim


--
Jim Fulton           mailto:jim@zope.com       Python Powered!        
CTO                  (888) 344-4332            http://www.python.org  
Zope Corporation     http://www.zope.com       http://www.zope.org