From 353360dbe5b4b13406dd3b582cfdedd9558377bb Mon Sep 17 00:00:00 2001 From: TomV Date: Sat, 8 Aug 2015 17:10:14 +0100 Subject: [PATCH] use local isclass --- _pytest/python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_pytest/python.py b/_pytest/python.py index 51a560f94..8438ca428 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1155,9 +1155,9 @@ def raises(expected_exception, *args, **kwargs): " derived from BaseException, not %s") if isinstance(expected_exception, tuple): for exc in expected_exception: - if not inspect.isclass(exc): + if not isclass(exc): raise TypeError(msg % type(exc)) - elif not inspect.isclass(expected_exception): + elif not isclass(expected_exception): raise TypeError(msg % type(expected_exception)) if not args: