Fix issue where pytest.raises() doesn't always return Exception instance in py26

Fixes #767
This commit is contained in:
Bruno Oliveira
2015-06-18 21:04:47 -03:00
parent 0431b8bb74
commit eb73db56c7
3 changed files with 12 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ class TestRaises:
1/0
print (excinfo)
assert excinfo.type == ZeroDivisionError
assert isinstance(excinfo.value, ZeroDivisionError)
def test_noraise():
with pytest.raises(pytest.raises.Exception):