Skip to content

Commit

Permalink
Skip flaky recursion test on PyPy (#2661) (#2663)
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
  • Loading branch information
Pierre-Sassoulas and jacobtylerwalls authored Dec 22, 2024
1 parent 50916d6 commit 7cfbad1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 7cfbad1

Please sign in to comment.