use local isclass

This commit is contained in:
TomV 2015-08-08 17:10:14 +01:00
parent 3497aa0766
commit 353360dbe5
1 changed files with 2 additions and 2 deletions

View File

@ -1155,9 +1155,9 @@ def raises(expected_exception, *args, **kwargs):
" derived from BaseException, not %s") " derived from BaseException, not %s")
if isinstance(expected_exception, tuple): if isinstance(expected_exception, tuple):
for exc in expected_exception: for exc in expected_exception:
if not inspect.isclass(exc): if not isclass(exc):
raise TypeError(msg % type(exc)) raise TypeError(msg % type(exc))
elif not inspect.isclass(expected_exception): elif not isclass(expected_exception):
raise TypeError(msg % type(expected_exception)) raise TypeError(msg % type(expected_exception))
if not args: if not args: