[issue32487] assertRaises should return the "captured" exception

2018-01-03 Thread R. David Murray
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

[issue32487] assertRaises should return the "captured" exception

2018-01-03 Thread Facundo Batista
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