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.
Created on 2018年01月03日 15:41 by facundobatista, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg309414 - (view) | Author: Facundo Batista (facundobatista) * (Python committer) | Date: 2018年01月03日 15:41 | |
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 |
|||
| msg309415 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2018年01月03日 16:11 | |
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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:56 | admin | set | github: 76668 |
| 2018年01月03日 16:11:31 | r.david.murray | set | status: open -> closed superseder: assertRaises should return the exception in its simple form nosy: + r.david.murray messages: + msg309415 resolution: duplicate stage: needs patch -> resolved |
| 2018年01月03日 15:41:56 | facundobatista | create | |