[Zope-dev] Summary of this week's IRC meeting (2010-04-06)

Marius Gedminas marius at gedmin.as
Tue Apr 6 13:01:59 EDT 2010


On Tue, Apr 06, 2010 at 12:15:41PM -0400, Tres Seaver wrote:
> Some discussion of the general problem of doctests breaking due to exception
> formatting led to a suggestion from Jim Fulton that we implement a testing
> API similar the ``unittest.TestCase.assertRaises``, but with the additional
> feature that it returns the exception value, to permit further assertions
> about the state of that object.

unittest.TestCase.assertRaises gives you access to the exception value
afterwards, starting with Python 2.7.  It's been backported to older
versions of Python and placed on PyPI as unittest2:
http://pypi.python.org/pypi/unittest2

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3 consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20100406/dd5d6114/attachment.bin 


More information about the Zope-Dev mailing list