Use RuntimeError for py27 + py34 compat

This commit is contained in:
Anthony Sottile 2018-10-08 11:47:06 -07:00
parent 3901569f26
commit 4f631440be
1 changed files with 2 additions and 2 deletions

View File

@ -1371,7 +1371,7 @@ def test_exception_repr_extraction_error_on_recursion():
def b(x):
return a(numpy_like())
with pytest.raises(RecursionError) as excinfo:
with pytest.raises(RuntimeError) as excinfo:
a(numpy_like())
matcher = LineMatcher(str(excinfo.getrepr()).splitlines())
@ -1395,6 +1395,6 @@ def test_no_recursion_index_on_recursion_error():
def __getattr__(self, attr):
return getattr(self, "_" + attr)
with pytest.raises(RecursionError) as excinfo:
with pytest.raises(RuntimeError) as excinfo:
RecursionDepthError().trigger
assert "maximum recursion" in str(excinfo.getrepr())