summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-01-29 20:09:00 +0000
committerGitHub <noreply@github.com>2023-01-29 20:09:00 +0000
commitaacbcf96640ccd81569fe30b89b99ed888e83cf9 (patch)
tree3080322bf74095170c85408ebcc0c92afe7f58ac
parentc8f83168aa62f67e610afc161d77be845091b349 (diff)
downloadastroid-git-aacbcf96640ccd81569fe30b89b99ed888e83cf9.tar.gz
Skip recursion test on PyPy (#1987) (#1988)
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> (cherry picked from commit c1e4c95b0d6e555a92484183b89be683dfbde458) Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
-rw-r--r--tests/unittest_inference.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/unittest_inference.py b/tests/unittest_inference.py
index 13514570..e66103d9 100644
--- a/tests/unittest_inference.py
+++ b/tests/unittest_inference.py
@@ -23,7 +23,7 @@ from astroid import helpers, nodes, objects, test_utils, util
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,
@@ -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: