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:

Marius Gedminas
http://pov.lt/ -- Zope 3 consulting and development

Attachment: signature.asc
Description: Digital signature

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to