From 4f631440be84d6e7173a834afa58af69cbda67c3 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 8 Oct 2018 11:47:06 -0700 Subject: [PATCH] Use RuntimeError for py27 + py34 compat --- testing/code/test_excinfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index 5483ebc49..3ae383627 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -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())