Skip to content

Commit edde84c

Browse files
committed
Enable testing with hiredis parser
1 parent 64fb176 commit edde84c

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

redis/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ def is_exceeds_max_size(self, count: int) -> bool:
111111
return count > self._max_size
112112

113113
def is_allowed_to_cache(self, command: str) -> bool:
114-
return command in self.DEFAULT_ALLOW_LIST
114+
return command in self.DEFAULT_ALLOW_LIST

tests/test_cache.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def set_get(client, key, value):
3333
return client.get(key)
3434

3535

36-
@pytest.mark.skipif(HIREDIS_AVAILABLE, reason="PythonParser only")
3736
class TestCache:
3837
@pytest.mark.parametrize("r", [{"cache": TTLCache(128, 300), "use_cache": True}], indirect=True)
3938
@pytest.mark.onlynoncluster
@@ -279,7 +278,6 @@ def test_cache_flushed_on_server_flush(self, r, cache):
279278
assert cache.currsize == 0
280279

281280

282-
@pytest.mark.skipif(HIREDIS_AVAILABLE, reason="PythonParser only")
283281
@pytest.mark.onlycluster
284282
class TestClusterCache:
285283
@pytest.mark.parametrize("r", [{"cache": LRUCache(maxsize=128), "use_cache": True}], indirect=True)
@@ -523,7 +521,6 @@ def test_cache_flushed_on_server_flush(self, r, cache):
523521
assert r.get("foo") is None
524522
assert cache.currsize == 0
525523

526-
@pytest.mark.skipif(HIREDIS_AVAILABLE, reason="PythonParser only")
527524
@pytest.mark.onlynoncluster
528525
class TestSentinelCache:
529526
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)