R. David Murray added the comment:
This has been proposed and rejected before, for example in issue 28135. If you
want to pursue it you'll need to start a thread on python-ideas.
--
nosy: +r.david.murray
resolution: -> duplicate
stage: needs patch -> resolved
New submission from Facundo Batista :
Sometimes it's nice to do extra checks on the error raised and captured by
self.assertRaises call.
Yes, the same can be achieved using assertRaises as a context manager and then
accessing the `exception` attribute in the context