From 7fa848126c8178e78c47dff0415a1fc175b041eb Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 24 Apr 2023 00:24:48 +0200 Subject: Remove cachedproperty decorator (#2140) --- tests/test_decorators.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'tests/test_decorators.py') diff --git a/tests/test_decorators.py b/tests/test_decorators.py index 8a254926..28c8ee6c 100644 --- a/tests/test_decorators.py +++ b/tests/test_decorators.py @@ -5,8 +5,7 @@ import pytest from _pytest.recwarn import WarningsRecorder -from astroid.const import PY38_PLUS -from astroid.decorators import cachedproperty, deprecate_default_argument_values +from astroid.decorators import deprecate_default_argument_values class SomeClass: @@ -102,18 +101,3 @@ class TestDeprecationDecorators: instance = SomeClass(name="some_name") instance.func(name="", var=42) assert len(recwarn) == 0 - - -@pytest.mark.skipif(not PY38_PLUS, reason="Requires Python 3.8 or higher") -def test_deprecation_warning_on_cachedproperty() -> None: - """Check the DeprecationWarning on cachedproperty.""" - - with pytest.warns(DeprecationWarning) as records: - - class MyClass: # pylint: disable=unused-variable - @cachedproperty - def my_property(self): - return 1 - - assert len(records) == 1 - assert "functools.cached_property" in records[0].message.args[0] -- cgit v1.2.1