remove usage of exception module, which is gone in py3.3

This commit is contained in:
Benjamin Peterson
2012-08-28 16:35:06 -04:00
parent e876ad9abd
commit 7f36649763
2 changed files with 3 additions and 3 deletions

View File

@@ -781,7 +781,7 @@ def raises(ExpectedException, *args, **kwargs):
# we want to catch a AssertionError
# replace our subclass with the builtin one
# see https://bitbucket.org/hpk42/pytest/issue/176/pytestraises
from exceptions import AssertionError as ExpectedException
from _pytest.assertion.util import BuiltinAssertionError as ExpectedException
if not args:
return RaisesContext(ExpectedException)