Skip to content

Commit

Permalink
fix: str-len
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Jan 8, 2025
1 parent 8b8bf13 commit 84ff4e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions tests/fakeredis/test/test_hypothesis/_server_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pytest
import redis
from fakeredis._server import _create_version


def server_info() -> Tuple[str, Union[None, Tuple[int, ...]]]:
Expand All @@ -12,10 +11,7 @@ def server_info() -> Tuple[str, Union[None, Tuple[int, ...]]]:
client = redis.Redis("localhost", port=6380, db=2)
client_info = client.info()
server_type = "dragonfly" if "dragonfly_version" in client_info else "redis"
server_version = (
client_info["redis_version"] if server_type != "dragonfly" else (7, 0)
)
server_version = _create_version(server_version) or (7,)
server_version = (7, 0)
return server_type, server_version
except redis.ConnectionError as e:
print(e)
Expand Down
2 changes: 0 additions & 2 deletions tests/fakeredis/test/test_hypothesis/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class TestHash(BaseTest):
st.just("hexpire"),
keys,
expires_seconds,
# TODO: Dragonfly does not support the following arguments
# *zero_or_more("nx", "xx", "gt", "lt"),
st.just("fields"),
st.just(2),
st.lists(fields, min_size=2, max_size=2),
Expand Down

0 comments on commit 84ff4e8

Please sign in to comment.