Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip recursion test on PyPy #1987

Merged
merged 2 commits into from
Jan 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/unittest_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from astroid.arguments import CallSite
from astroid.bases import BoundMethod, Instance, UnboundMethod
from astroid.builder import AstroidBuilder, _extract_single_node, extract_node, parse
from astroid.const import PY38_PLUS, PY39_PLUS
from astroid.const import IS_PYPY, PY38_PLUS, PY39_PLUS
from astroid.context import InferenceContext
from astroid.exceptions import (
AstroidTypeError,
Expand Down Expand Up @@ -6820,10 +6820,18 @@ def test_imported_module_var_inferable3() -> None:
assert i_w_val.as_string() == "['w', 'v']"


@pytest.mark.skipif(
IS_PYPY, reason="Test run with coverage on PyPy sometimes raises a RecursionError"
)
def test_recursion_on_inference_tip() -> None:
"""Regression test for recursion in inference tip.

Originally reported in https://github.com/PyCQA/pylint/issues/5408.

When run on PyPy with coverage enabled, the test can sometimes raise a RecursionError
outside of the code that we actually want to test.
As the issue seems to be with coverage, skip the test on PyPy.
https://github.com/PyCQA/astroid/pull/1984#issuecomment-1407720311
"""
code = """
class MyInnerClass:
Expand Down