refs #335: clarify that the exception info returned by pytest.raises is a py.code.ExceptionInfo()

This commit is contained in:
Mathieu Agopian 2013-08-01 11:19:47 +02:00
parent 905c648b99
commit 99783b6fba
1 changed files with 2 additions and 0 deletions

View File

@ -844,6 +844,8 @@ def raises(ExpectedException, *args, **kwargs):
""" assert that a code block/function call raises @ExpectedException """ assert that a code block/function call raises @ExpectedException
and raise a failure exception otherwise. and raise a failure exception otherwise.
This helper produces a ``py.code.ExceptionInfo()`` object.
If using Python 2.5 or above, you may use this function as a If using Python 2.5 or above, you may use this function as a
context manager:: context manager::