From 7cfbad135cbfea51cf8298cd506c0ee03bd42d8a Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 23 Dec 2024 00:15:17 +0100 Subject: [PATCH] Skip flaky recursion test on PyPy (#2661) (#2663) Co-authored-by: Jacob Walls --- tests/test_transforms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_transforms.py b/tests/test_transforms.py index 460868e02b..f4875ca5f2 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -265,6 +265,9 @@ def transform_class(cls): """ ) + @pytest.mark.skipif( + IS_PYPY, reason="Could not find a useful recursion limit on all versions" + ) def test_transform_aborted_if_recursion_limited(self): def transform_call(node: Call) -> Const: return node @@ -274,7 +277,7 @@ def transform_call(node: Call) -> Const: ) original_limit = sys.getrecursionlimit() - sys.setrecursionlimit(500 if IS_PYPY else 1000) + sys.setrecursionlimit(1000) try: with pytest.warns(UserWarning) as records: