[Zope-Coders] zLOG warnings and testrunner

Jeremy Hylton jeremy@zope.com
Thu, 27 Sep 2001 12:24:30 -0400 (EDT)


We should have a method available for unit tests that is analogous to
assertRaises().  The method assertLogs() would be used for an
operation where you expect the operation to execute without raising an
exception *and* to log an error message.  It would better to be
explicit in the test method about what should log a message and what
shouldn't.

I think we should implement this by producing a zunit module that
extends unittest with whatever Zope specific features we need.  The
write our unit tests to import zunit instead of unittest -- and use
zunit.main() instead of unittest.main().

We should be careful not to diverge too much from the pyunit
approach.  Eventually, we may be able to push something like zLOG into
the Python standard library and push our zunit changes back into
pyunit.

Jeremy