[issue5206] with context object for unittest assertRaises()

Antoine Pitrou report at bugs.python.org
Tue Feb 10 19:23:00 CET 2009


Antoine Pitrou <pitrou at free.fr> added the comment:

This is already done in trunk, you can use it as follows:

with self.assertRaises(ZeroDivisionError):
    1/0

----------
nosy: +pitrou
resolution:  -> out of date
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5206>
_______________________________________


More information about the Python-bugs-list mailing list