Use RuntimeError for py27 + py34 compat
This commit is contained in:
parent
3901569f26
commit
4f631440be
|
@ -1371,7 +1371,7 @@ def test_exception_repr_extraction_error_on_recursion():
|
||||||
def b(x):
|
def b(x):
|
||||||
return a(numpy_like())
|
return a(numpy_like())
|
||||||
|
|
||||||
with pytest.raises(RecursionError) as excinfo:
|
with pytest.raises(RuntimeError) as excinfo:
|
||||||
a(numpy_like())
|
a(numpy_like())
|
||||||
|
|
||||||
matcher = LineMatcher(str(excinfo.getrepr()).splitlines())
|
matcher = LineMatcher(str(excinfo.getrepr()).splitlines())
|
||||||
|
@ -1395,6 +1395,6 @@ def test_no_recursion_index_on_recursion_error():
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return getattr(self, "_" + attr)
|
return getattr(self, "_" + attr)
|
||||||
|
|
||||||
with pytest.raises(RecursionError) as excinfo:
|
with pytest.raises(RuntimeError) as excinfo:
|
||||||
RecursionDepthError().trigger
|
RecursionDepthError().trigger
|
||||||
assert "maximum recursion" in str(excinfo.getrepr())
|
assert "maximum recursion" in str(excinfo.getrepr())
|
||||||
|
|
Loading…
Reference in New Issue