Skip to content

Commit c1e4c95

Browse files
cdce8pDanielNoord
andauthored
Skip recursion test on PyPy (#1987)
Co-authored-by: Daniël van Noord <[email protected]>
1 parent e325bd3 commit c1e4c95

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/unittest_inference.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from astroid.arguments import CallSite
2424
from astroid.bases import BoundMethod, Instance, UnboundMethod
2525
from astroid.builder import AstroidBuilder, _extract_single_node, extract_node, parse
26-
from astroid.const import PY38_PLUS, PY39_PLUS
26+
from astroid.const import IS_PYPY, PY38_PLUS, PY39_PLUS
2727
from astroid.context import InferenceContext
2828
from astroid.exceptions import (
2929
AstroidTypeError,
@@ -6820,10 +6820,18 @@ def test_imported_module_var_inferable3() -> None:
68206820
assert i_w_val.as_string() == "['w', 'v']"
68216821

68226822

6823+
@pytest.mark.skipif(
6824+
IS_PYPY, reason="Test run with coverage on PyPy sometimes raises a RecursionError"
6825+
)
68236826
def test_recursion_on_inference_tip() -> None:
68246827
"""Regression test for recursion in inference tip.
68256828
68266829
Originally reported in https://github.com/PyCQA/pylint/issues/5408.
6830+
6831+
When run on PyPy with coverage enabled, the test can sometimes raise a RecursionError
6832+
outside of the code that we actually want to test.
6833+
As the issue seems to be with coverage, skip the test on PyPy.
6834+
https://github.com/PyCQA/astroid/pull/1984#issuecomment-1407720311
68276835
"""
68286836
code = """
68296837
class MyInnerClass:

0 commit comments

Comments
 (0)