class _AssertRaisesContext: (source)
| Method | __enter__ |
Undocumented |
| Method | __exit__ |
Check exit exception against expected exception. |
| Method | __init__ |
|
| Instance Variable | exception |
The exception which was raised by the function being tested (if it raised one). |
| Method | _handle |
Call the given object using this object as a context manager. |
| Instance Variable | _expected |
See expected parameter of __init__ |
| Instance Variable | _expectedName |
A short string describing the expected exception (usually the name of the exception class). |
| Instance Variable | _returnValue |
The value returned by the callable being tested (only when not being used as a context manager). |
| Instance Variable | _testCase |
See testCase parameter of __init__ |
| Parameters | |
| testCase | The TestCase instance which is used to raise a test-failing exception when that is necessary. |
| expected | The exception type expected to be raised. |
| Parameters | |
obj:object | The object to call and which is expected to raise some exception. |
| Returns | |
BaseException | Whatever exception is raised by obj(). |