From 99783b6fba9c5d894583b080fb08d09cd5e41d15 Mon Sep 17 00:00:00 2001 From: Mathieu Agopian Date: Thu, 1 Aug 2013 11:19:47 +0200 Subject: [PATCH] refs #335: clarify that the exception info returned by pytest.raises is a py.code.ExceptionInfo() --- _pytest/python.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_pytest/python.py b/_pytest/python.py index 4915f5a5b..8ce12efb3 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -844,6 +844,8 @@ def raises(ExpectedException, *args, **kwargs): """ assert that a code block/function call raises @ExpectedException 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 context manager::