Message309414
| 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:56 | facundobatista | set | recipients:
+ facundobatista |
| 2018年01月03日 15:41:56 | facundobatista | set | messageid: <1514994116.04.0.467229070634.issue32487@psf.upfronthosting.co.za> |
| 2018年01月03日 15:41:55 | facundobatista | link | issue32487 messages |
| 2018年01月03日 15:41:55 | facundobatista | create |
|