1
0
Fork 0

Adding upstream version 1.13.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 17:18:44 +01:00
parent beebd280da
commit 9e8d2d0c6a
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
16 changed files with 291 additions and 327 deletions

View file

@ -22,8 +22,12 @@ def completer():
zset_type = "ziplist"
hash_type = "hashtable"
list_type = "quicklist"
if os.environ["REDIS_VERSION"] == "7":
zset_type = "listpack"
hash_type = "listpack"
list_type = "listpack"
@pytest.mark.parametrize(
@ -303,7 +307,7 @@ def test_peek_list_fetch_all(iredis_client, clean_redis):
FormattedText(
[
("class:dockey", "key: "),
("", r"list \(quicklist\) mem: \d+ bytes, ttl: -1"),
("", rf"list \({list_type}\) mem: \d+ bytes, ttl: -1"),
("", "\n"),
("class:dockey", "llen: "),
("", "5"),
@ -351,7 +355,7 @@ def test_peek_set_fetch_part(iredis_client, clean_redis):
peek_result = list(iredis_client.do_peek("myset"))
assert peek_result[0][0] == ("class:dockey", "key: ")
assert peek_result[0][1][1].startswith("set (hashtable) mem: 2")
assert peek_result[0][1][1].startswith(f"set ({hash_type}) mem: ")
def test_peek_zset_fetch_all(iredis_client, clean_redis):
@ -425,7 +429,7 @@ def test_peek_stream(iredis_client, clean_redis):
assert peek_result[0][0] == ("class:dockey", "key: ")
assert re.match(
r"stream \((stream|unknown)\) mem: 6\d\d bytes, ttl: -1", peek_result[0][1][1]
r"stream \((stream|unknown)\) mem: \d+ bytes, ttl: -1", peek_result[0][1][1]
)
assert peek_result[0][2:18] == FormattedText(
[