fixes #335: document ExceptionInfo returned by pytest.raises
This commit is contained in:
parent
1023390f53
commit
905c648b99
|
@ -78,6 +78,12 @@ and if you need to have access to the actual exception info you may use::
|
|||
|
||||
# do checks related to excinfo.type, excinfo.value, excinfo.traceback
|
||||
|
||||
``excinfo`` is a `py.code.ExceptionInfo`_ instance, which is a wrapper around
|
||||
the actual exception raised.
|
||||
|
||||
.. _py.code.ExceptionInfo:
|
||||
http://pylib.readthedocs.org/en/latest/code.html#py-code-exceptioninfo
|
||||
|
||||
If you want to write test code that works on Python 2.4 as well,
|
||||
you may also use two other ways to test for an expected exception::
|
||||
|
||||
|
|
Loading…
Reference in New Issue