This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author facundobatista
Recipients facundobatista
Date 2018-01-03.15:41:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1514994116.04.0.467229070634.issue32487@psf.upfronthosting.co.za>
In-reply-to
Content
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 manager, but it looks too cumbersome to just get the exception, when it can be simply returned by the assertRaises call.

Note 1: Currently it returns None, so no backward compatibility problem.

Note 2: assertRaises in testtools does this and is very useful
History
Date User Action Args
2018-01-03 15:41:56facundobatistasetrecipients: + facundobatista
2018-01-03 15:41:56facundobatistasetmessageid: <1514994116.04.0.467229070634.issue32487@psf.upfronthosting.co.za>
2018-01-03 15:41:55facundobatistalinkissue32487 messages
2018-01-03 15:41:55facundobatistacreate