Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h committed May 6, 2024
1 parent 0bcd574 commit fec8e32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/test_asyncio/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 3 additions & 1 deletion tests/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit fec8e32

Please sign in to comment.