summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2023-01-29 20:41:31 +0100
committerGitHub <noreply@github.com>2023-01-29 19:41:31 +0000
commitc1e4c95b0d6e555a92484183b89be683dfbde458 (patch)
treee1be03a3ca72cbf2775ed5c02d1e5e7682695797
parente325bd3f2c8a76138f5a2f12f374778c476be5af (diff)
downloadastroid-git-c1e4c95b0d6e555a92484183b89be683dfbde458.tar.gz
Skip recursion test on PyPy (#1987)
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@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: