New submission from Kristján Valur Jónsson <krist...@ccpgames.com>:

It can be useful, after a unittest.assertRaises() or assertRaisesRegexp() 
to be able to take a closer look at the exception that was raised.
To this end, I propose returning the caught exception from these methods.

Additionally, the context manager involved with keep the caught exception 
in its exc_value member after it has been successfully thrown (and 
matched)

----------
components: Library (Lib)
files: unittest.patch
keywords: easy, needs review, patch, patch
messages: 89304
nosy: krisvale
severity: normal
status: open
title: let unittest.assertRaises() return the exception object caught
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file14280/unittest.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6275>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to