diff --git a/tests/test_asyncio/test_cache.py b/tests/test_asyncio/test_cache.py index 4762bb7c05..a0b5aad5cb 100644 --- a/tests/test_asyncio/test_cache.py +++ b/tests/test_asyncio/test_cache.py @@ -4,6 +4,7 @@ import pytest_asyncio from redis._cache import _LocalCache from redis.utils import HIREDIS_AVAILABLE +from tests.conftest import skip_if_server_version_lt @pytest_asyncio.fixture @@ -15,6 +16,7 @@ async def r(request, create_redis): @pytest.mark.skipif(HIREDIS_AVAILABLE, reason="PythonParser only") +@skip_if_server_version_lt("7.4.0") class TestLocalCache: @pytest.mark.onlynoncluster @pytest.mark.parametrize("r", [{"cache": _LocalCache()}], indirect=True) @@ -187,6 +189,7 @@ async def test_csc_not_cause_disconnects(self, r): @pytest.mark.skipif(HIREDIS_AVAILABLE, reason="PythonParser only") @pytest.mark.onlycluster +@skip_if_server_version_lt("7.4.0") class TestClusterLocalCache: @pytest.mark.parametrize("r", [{"cache": _LocalCache()}], indirect=True) async def test_get_from_cache(self, r, r2): diff --git a/tests/test_cache.py b/tests/test_cache.py index dd33afd23e..7a53d4e706 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -4,7 +4,7 @@ import redis from redis._cache import _LocalCache from redis.utils import HIREDIS_AVAILABLE -from tests.conftest import _get_client +from tests.conftest import _get_client, skip_if_server_version_lt @pytest.fixture() @@ -19,6 +19,7 @@ def r(request): @pytest.mark.skipif(HIREDIS_AVAILABLE, reason="PythonParser only") +@skip_if_server_version_lt("7.4.0") class TestLocalCache: @pytest.mark.onlynoncluster @pytest.mark.parametrize("r", [{"cache": _LocalCache()}], indirect=True) @@ -192,6 +193,7 @@ def test_csc_not_cause_disconnects(self, r): @pytest.mark.skipif(HIREDIS_AVAILABLE, reason="PythonParser only") @pytest.mark.onlycluster +@skip_if_server_version_lt("7.4.0") class TestClusterLocalCache: @pytest.mark.parametrize("r", [{"cache": _LocalCache()}], indirect=True) def test_get_from_cache(self, r, r2):