From e35e559d8b90adb6a0225f0e66e84df58b793d61 Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Wed, 2 Jul 2025 19:40:23 +0300 Subject: [PATCH 1/3] Add support for new BITOP operations: DIFF, DIFF1, ANDOR, ONE --- tests/test_asyncio/test_commands.py | 124 ++++++++++++++++++++++++++++ tests/test_commands.py | 97 ++++++++++++++++++++++ 2 files changed, 221 insertions(+) diff --git a/tests/test_asyncio/test_commands.py b/tests/test_asyncio/test_commands.py index bfb6855a0f..f2689e6086 100644 --- a/tests/test_asyncio/test_commands.py +++ b/tests/test_asyncio/test_commands.py @@ -879,6 +879,130 @@ async def test_bitop_string_operands(self, r: redis.Redis): assert int(binascii.hexlify(await r.get("res2")), 16) == 0x0102FFFF assert int(binascii.hexlify(await r.get("res3")), 16) == 0x000000FF + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + async def test_bitop_diff(self, r: redis.Redis): + """Test BITOP DIFF operation""" + # Set up test data: a=0b11110000, b=0b11000000, c=0b10000000 + await r.set("a", b"\xf0") # 11110000 + await r.set("b", b"\xc0") # 11000000 + await r.set("c", b"\x80") # 10000000 + + # DIFF: a AND NOT(b OR c) = 11110000 AND NOT(11000000) = 11110000 AND 00111111 = 00110000 + result = await r.bitop("DIFF", "result", "a", "b", "c") + assert result == 1 # Length of result + assert await r.get("result") == b"\x30" # 00110000 + + # Test with non-existent keys + await r.bitop("DIFF", "result2", "a", "nonexistent") + assert await r.get("result2") == b"\xf0" # Should be same as 'a' + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + async def test_bitop_diff1(self, r: redis.Redis): + """Test BITOP DIFF1 operation""" + # Set up test data: a=0b11110000, b=0b11000000, c=0b10000000 + await r.set("a", b"\xf0") # 11110000 + await r.set("b", b"\xc0") # 11000000 + await r.set("c", b"\x80") # 10000000 + + # DIFF1: NOT(a) AND (b OR c) = NOT(11110000) AND (11000000) = 00001111 AND 11000000 = 00000000 + result = await r.bitop("DIFF1", "result", "a", "b", "c") + assert result == 1 # Length of result + assert await r.get("result") == b"\x00" # 00000000 + + # Test with different data where result is non-zero + await r.set("d", b"\x0f") # 00001111 + await r.set("e", b"\x03") # 00000011 + # DIFF1: NOT(d) AND e = NOT(00001111) AND 00000011 = 11110000 AND 00000011 = 00000000 + await r.bitop("DIFF1", "result2", "d", "e") + assert await r.get("result2") == b"\x00" + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + async def test_bitop_andor(self, r: redis.Redis): + """Test BITOP ANDOR operation""" + # Set up test data: a=0b11110000, b=0b11000000, c=0b10000000 + await r.set("a", b"\xf0") # 11110000 + await r.set("b", b"\xc0") # 11000000 + await r.set("c", b"\x80") # 10000000 + + # ANDOR: a AND (b OR c) = 11110000 AND (11000000) = 11110000 AND 11000000 = 11000000 + result = await r.bitop("ANDOR", "result", "a", "b", "c") + assert result == 1 # Length of result + assert await r.get("result") == b"\xc0" # 11000000 + + # Test with non-overlapping bits + await r.set("x", b"\xf0") # 11110000 + await r.set("y", b"\x0f") # 00001111 + await r.bitop("ANDOR", "result2", "x", "y") + assert await r.get("result2") == b"\x00" # No overlap + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + async def test_bitop_one(self, r: redis.Redis): + """Test BITOP ONE operation""" + # Set up test data: a=0b11110000, b=0b11000000, c=0b10000000 + await r.set("a", b"\xf0") # 11110000 + await r.set("b", b"\xc0") # 11000000 + await r.set("c", b"\x80") # 10000000 + + # ONE: bits set in exactly one key + # Position analysis: + # Bit 7: a=1, b=1, c=1 -> count=3 -> not included + # Bit 6: a=1, b=1, c=0 -> count=2 -> not included + # Bit 5: a=1, b=0, c=0 -> count=1 -> included + # Bit 4: a=1, b=0, c=0 -> count=1 -> included + # Expected result: 00110000 = 0x30 + result = await r.bitop("ONE", "result", "a", "b", "c") + assert result == 1 # Length of result + assert await r.get("result") == b"\x30" # 00110000 + + # Test with two keys (should be equivalent to XOR) + await r.set("x", b"\xf0") # 11110000 + await r.set("y", b"\x0f") # 00001111 + await r.bitop("ONE", "result2", "x", "y") + assert await r.get("result2") == b"\xff" # 11111111 (XOR result) + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + async def test_bitop_new_operations_with_empty_keys(self, r: redis.Redis): + """Test new BITOP operations with empty/non-existent keys""" + await r.set("a", b"\xff") # 11111111 + + # Test with empty destination + await r.bitop("DIFF", "empty_result", "nonexistent", "a") + assert await r.get("empty_result") is None + + await r.bitop("DIFF1", "empty_result2", "a", "nonexistent") + assert await r.get("empty_result2") is None + + await r.bitop("ANDOR", "empty_result3", "a", "nonexistent") + assert await r.get("empty_result3") is None + + await r.bitop("ONE", "empty_result4", "nonexistent") + assert await r.get("empty_result4") is None + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + async def test_bitop_new_operations_return_values(self, r: redis.Redis): + """Test that new BITOP operations return correct length values""" + await r.set("a", b"\xff\x00\xff") # 3 bytes + await r.set("b", b"\x00\xff") # 2 bytes + + # All operations should return the length of the result string + result1 = await r.bitop("DIFF", "result1", "a", "b") + assert result1 == 3 # Length of longest input + + result2 = await r.bitop("DIFF1", "result2", "a", "b") + assert result2 == 3 + + result3 = await r.bitop("ANDOR", "result3", "a", "b") + assert result3 == 3 + + result4 = await r.bitop("ONE", "result4", "a", "b") + assert result4 == 3 + @pytest.mark.onlynoncluster @skip_if_server_version_lt("2.8.7") async def test_bitpos(self, r: redis.Redis): diff --git a/tests/test_commands.py b/tests/test_commands.py index 04574cbb81..6a2d226879 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1313,6 +1313,103 @@ def test_bitop_string_operands(self, r): assert int(binascii.hexlify(r["res2"]), 16) == 0x0102FFFF assert int(binascii.hexlify(r["res3"]), 16) == 0x000000FF + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + def test_bitop_diff(self, r): + r["a"] = b"\xf0" + r["b"] = b"\xc0" + r["c"] = b"\x80" + + result = r.bitop("DIFF", "result", "a", "b", "c") + assert result == 1 + assert r["result"] == b"\x30" + + r.bitop("DIFF", "result2", "a", "nonexistent") + assert r["result2"] == b"\xf0" + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + def test_bitop_diff1(self, r): + r["a"] = b"\xf0" + r["b"] = b"\xc0" + r["c"] = b"\x80" + + result = r.bitop("DIFF1", "result", "a", "b", "c") + assert result == 1 + assert r["result"] == b"\x00" + + r["d"] = b"\x0f" + r["e"] = b"\x03" + r.bitop("DIFF1", "result2", "d", "e") + assert r["result2"] == b"\x00" + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + def test_bitop_andor(self, r): + r["a"] = b"\xf0" + r["b"] = b"\xc0" + r["c"] = b"\x80" + + result = r.bitop("ANDOR", "result", "a", "b", "c") + assert result == 1 + assert r["result"] == b"\xc0" + + r["x"] = b"\xf0" + r["y"] = b"\x0f" + r.bitop("ANDOR", "result2", "x", "y") + assert r["result2"] == b"\x00" + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + def test_bitop_one(self, r): + r["a"] = b"\xf0" + r["b"] = b"\xc0" + r["c"] = b"\x80" + + result = r.bitop("ONE", "result", "a", "b", "c") + assert result == 1 + assert r["result"] == b"\x30" + + r["x"] = b"\xf0" + r["y"] = b"\x0f" + r.bitop("ONE", "result2", "x", "y") + assert r["result2"] == b"\xff" + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + def test_bitop_new_operations_with_empty_keys(self, r): + r["a"] = b"\xff" + + r.bitop("DIFF", "empty_result", "nonexistent", "a") + assert r.get("empty_result") is None + + r.bitop("DIFF1", "empty_result2", "a", "nonexistent") + assert r.get("empty_result2") is None + + r.bitop("ANDOR", "empty_result3", "a", "nonexistent") + assert r.get("empty_result3") is None + + r.bitop("ONE", "empty_result4", "nonexistent") + assert r.get("empty_result4") is None + + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("8.2.0") + def test_bitop_new_operations_return_values(self, r): + r["a"] = b"\xff\x00\xff" + r["b"] = b"\x00\xff" + + result1 = r.bitop("DIFF", "result1", "a", "b") + assert result1 == 3 + + result2 = r.bitop("DIFF1", "result2", "a", "b") + assert result2 == 3 + + result3 = r.bitop("ANDOR", "result3", "a", "b") + assert result3 == 3 + + result4 = r.bitop("ONE", "result4", "a", "b") + assert result4 == 3 + @pytest.mark.onlynoncluster @skip_if_server_version_lt("2.8.7") def test_bitpos(self, r): From 18775cab6e1075273b7164b712362ed1fdc3ab20 Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Wed, 2 Jul 2025 20:43:03 +0300 Subject: [PATCH 2/3] fix linting issues --- tests/test_asyncio/test_commands.py | 101 ++++++++++------------------ tests/test_commands.py | 34 +++++----- 2 files changed, 54 insertions(+), 81 deletions(-) diff --git a/tests/test_asyncio/test_commands.py b/tests/test_asyncio/test_commands.py index f2689e6086..622ae85f0c 100644 --- a/tests/test_asyncio/test_commands.py +++ b/tests/test_asyncio/test_commands.py @@ -882,103 +882,78 @@ async def test_bitop_string_operands(self, r: redis.Redis): @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") async def test_bitop_diff(self, r: redis.Redis): - """Test BITOP DIFF operation""" - # Set up test data: a=0b11110000, b=0b11000000, c=0b10000000 - await r.set("a", b"\xf0") # 11110000 - await r.set("b", b"\xc0") # 11000000 - await r.set("c", b"\x80") # 10000000 + await r.set("a", b"\xf0") + await r.set("b", b"\xc0") + await r.set("c", b"\x80") - # DIFF: a AND NOT(b OR c) = 11110000 AND NOT(11000000) = 11110000 AND 00111111 = 00110000 result = await r.bitop("DIFF", "result", "a", "b", "c") - assert result == 1 # Length of result - assert await r.get("result") == b"\x30" # 00110000 + assert result == 1 + assert await r.get("result") == b"\x30" - # Test with non-existent keys await r.bitop("DIFF", "result2", "a", "nonexistent") - assert await r.get("result2") == b"\xf0" # Should be same as 'a' + assert await r.get("result2") == b"\xf0" @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") async def test_bitop_diff1(self, r: redis.Redis): - """Test BITOP DIFF1 operation""" - # Set up test data: a=0b11110000, b=0b11000000, c=0b10000000 - await r.set("a", b"\xf0") # 11110000 - await r.set("b", b"\xc0") # 11000000 - await r.set("c", b"\x80") # 10000000 + await r.set("a", b"\xf0") + await r.set("b", b"\xc0") + await r.set("c", b"\x80") - # DIFF1: NOT(a) AND (b OR c) = NOT(11110000) AND (11000000) = 00001111 AND 11000000 = 00000000 result = await r.bitop("DIFF1", "result", "a", "b", "c") - assert result == 1 # Length of result - assert await r.get("result") == b"\x00" # 00000000 + assert result == 1 + assert await r.get("result") == b"\x00" - # Test with different data where result is non-zero - await r.set("d", b"\x0f") # 00001111 - await r.set("e", b"\x03") # 00000011 - # DIFF1: NOT(d) AND e = NOT(00001111) AND 00000011 = 11110000 AND 00000011 = 00000000 + await r.set("d", b"\x0f") + await r.set("e", b"\x03") await r.bitop("DIFF1", "result2", "d", "e") assert await r.get("result2") == b"\x00" @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") async def test_bitop_andor(self, r: redis.Redis): - """Test BITOP ANDOR operation""" - # Set up test data: a=0b11110000, b=0b11000000, c=0b10000000 - await r.set("a", b"\xf0") # 11110000 - await r.set("b", b"\xc0") # 11000000 - await r.set("c", b"\x80") # 10000000 + await r.set("a", b"\xf0") + await r.set("b", b"\xc0") + await r.set("c", b"\x80") - # ANDOR: a AND (b OR c) = 11110000 AND (11000000) = 11110000 AND 11000000 = 11000000 result = await r.bitop("ANDOR", "result", "a", "b", "c") - assert result == 1 # Length of result - assert await r.get("result") == b"\xc0" # 11000000 + assert result == 1 + assert await r.get("result") == b"\xc0" - # Test with non-overlapping bits - await r.set("x", b"\xf0") # 11110000 - await r.set("y", b"\x0f") # 00001111 + await r.set("x", b"\xf0") + await r.set("y", b"\x0f") await r.bitop("ANDOR", "result2", "x", "y") - assert await r.get("result2") == b"\x00" # No overlap + assert await r.get("result2") == b"\x00" @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") async def test_bitop_one(self, r: redis.Redis): - """Test BITOP ONE operation""" - # Set up test data: a=0b11110000, b=0b11000000, c=0b10000000 - await r.set("a", b"\xf0") # 11110000 - await r.set("b", b"\xc0") # 11000000 - await r.set("c", b"\x80") # 10000000 - - # ONE: bits set in exactly one key - # Position analysis: - # Bit 7: a=1, b=1, c=1 -> count=3 -> not included - # Bit 6: a=1, b=1, c=0 -> count=2 -> not included - # Bit 5: a=1, b=0, c=0 -> count=1 -> included - # Bit 4: a=1, b=0, c=0 -> count=1 -> included - # Expected result: 00110000 = 0x30 + await r.set("a", b"\xf0") + await r.set("b", b"\xc0") + await r.set("c", b"\x80") + result = await r.bitop("ONE", "result", "a", "b", "c") - assert result == 1 # Length of result - assert await r.get("result") == b"\x30" # 00110000 + assert result == 1 + assert await r.get("result") == b"\x30" - # Test with two keys (should be equivalent to XOR) - await r.set("x", b"\xf0") # 11110000 - await r.set("y", b"\x0f") # 00001111 + await r.set("x", b"\xf0") + await r.set("y", b"\x0f") await r.bitop("ONE", "result2", "x", "y") - assert await r.get("result2") == b"\xff" # 11111111 (XOR result) + assert await r.get("result2") == b"\xff" @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") async def test_bitop_new_operations_with_empty_keys(self, r: redis.Redis): - """Test new BITOP operations with empty/non-existent keys""" - await r.set("a", b"\xff") # 11111111 + await r.set("a", b"\xff") - # Test with empty destination await r.bitop("DIFF", "empty_result", "nonexistent", "a") - assert await r.get("empty_result") is None + assert await r.get("empty_result") == b"\x00" await r.bitop("DIFF1", "empty_result2", "a", "nonexistent") - assert await r.get("empty_result2") is None + assert await r.get("empty_result2") == b"\x00" await r.bitop("ANDOR", "empty_result3", "a", "nonexistent") - assert await r.get("empty_result3") is None + assert await r.get("empty_result3") == b"\x00" await r.bitop("ONE", "empty_result4", "nonexistent") assert await r.get("empty_result4") is None @@ -986,13 +961,11 @@ async def test_bitop_new_operations_with_empty_keys(self, r: redis.Redis): @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") async def test_bitop_new_operations_return_values(self, r: redis.Redis): - """Test that new BITOP operations return correct length values""" - await r.set("a", b"\xff\x00\xff") # 3 bytes - await r.set("b", b"\x00\xff") # 2 bytes + await r.set("a", b"\xff\x00\xff") + await r.set("b", b"\x00\xff") - # All operations should return the length of the result string result1 = await r.bitop("DIFF", "result1", "a", "b") - assert result1 == 3 # Length of longest input + assert result1 == 3 result2 = await r.bitop("DIFF1", "result2", "a", "b") assert result2 == 3 diff --git a/tests/test_commands.py b/tests/test_commands.py index 6a2d226879..a6073cde98 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1316,8 +1316,8 @@ def test_bitop_string_operands(self, r): @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") def test_bitop_diff(self, r): - r["a"] = b"\xf0" - r["b"] = b"\xc0" + r["a"] = b"\xf0" + r["b"] = b"\xc0" r["c"] = b"\x80" result = r.bitop("DIFF", "result", "a", "b", "c") @@ -1330,15 +1330,15 @@ def test_bitop_diff(self, r): @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") def test_bitop_diff1(self, r): - r["a"] = b"\xf0" - r["b"] = b"\xc0" - r["c"] = b"\x80" + r["a"] = b"\xf0" + r["b"] = b"\xc0" + r["c"] = b"\x80" result = r.bitop("DIFF1", "result", "a", "b", "c") assert result == 1 assert r["result"] == b"\x00" - r["d"] = b"\x0f" + r["d"] = b"\x0f" r["e"] = b"\x03" r.bitop("DIFF1", "result2", "d", "e") assert r["result2"] == b"\x00" @@ -1346,16 +1346,16 @@ def test_bitop_diff1(self, r): @pytest.mark.onlynoncluster @skip_if_server_version_lt("8.2.0") def test_bitop_andor(self, r): - r["a"] = b"\xf0" - r["b"] = b"\xc0" - r["c"] = b"\x80" + r["a"] = b"\xf0" + r["b"] = b"\xc0" + r["c"] = b"\x80" result = r.bitop("ANDOR", "result", "a", "b", "c") - assert result == 1 - assert r["result"] == b"\xc0" + assert result == 1 + assert r["result"] == b"\xc0" - r["x"] = b"\xf0" - r["y"] = b"\x0f" + r["x"] = b"\xf0" + r["y"] = b"\x0f" r.bitop("ANDOR", "result2", "x", "y") assert r["result2"] == b"\x00" @@ -1371,7 +1371,7 @@ def test_bitop_one(self, r): assert r["result"] == b"\x30" r["x"] = b"\xf0" - r["y"] = b"\x0f" + r["y"] = b"\x0f" r.bitop("ONE", "result2", "x", "y") assert r["result2"] == b"\xff" @@ -1381,13 +1381,13 @@ def test_bitop_new_operations_with_empty_keys(self, r): r["a"] = b"\xff" r.bitop("DIFF", "empty_result", "nonexistent", "a") - assert r.get("empty_result") is None + assert r.get("empty_result") == b"\x00" r.bitop("DIFF1", "empty_result2", "a", "nonexistent") - assert r.get("empty_result2") is None + assert r.get("empty_result2") == b"\x00" r.bitop("ANDOR", "empty_result3", "a", "nonexistent") - assert r.get("empty_result3") is None + assert r.get("empty_result3") == b"\x00" r.bitop("ONE", "empty_result4", "nonexistent") assert r.get("empty_result4") is None From dfaf525aea4874b859f9ce8bf87c4673a143ac4b Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Fri, 4 Jul 2025 15:19:04 +0300 Subject: [PATCH 3/3] change version checking from 8.2.0 to 8.1.224 --- tests/test_asyncio/test_commands.py | 12 ++++++------ tests/test_commands.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_asyncio/test_commands.py b/tests/test_asyncio/test_commands.py index 622ae85f0c..bf65210f31 100644 --- a/tests/test_asyncio/test_commands.py +++ b/tests/test_asyncio/test_commands.py @@ -880,7 +880,7 @@ async def test_bitop_string_operands(self, r: redis.Redis): assert int(binascii.hexlify(await r.get("res3")), 16) == 0x000000FF @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") async def test_bitop_diff(self, r: redis.Redis): await r.set("a", b"\xf0") await r.set("b", b"\xc0") @@ -894,7 +894,7 @@ async def test_bitop_diff(self, r: redis.Redis): assert await r.get("result2") == b"\xf0" @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") async def test_bitop_diff1(self, r: redis.Redis): await r.set("a", b"\xf0") await r.set("b", b"\xc0") @@ -910,7 +910,7 @@ async def test_bitop_diff1(self, r: redis.Redis): assert await r.get("result2") == b"\x00" @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") async def test_bitop_andor(self, r: redis.Redis): await r.set("a", b"\xf0") await r.set("b", b"\xc0") @@ -926,7 +926,7 @@ async def test_bitop_andor(self, r: redis.Redis): assert await r.get("result2") == b"\x00" @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") async def test_bitop_one(self, r: redis.Redis): await r.set("a", b"\xf0") await r.set("b", b"\xc0") @@ -942,7 +942,7 @@ async def test_bitop_one(self, r: redis.Redis): assert await r.get("result2") == b"\xff" @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") async def test_bitop_new_operations_with_empty_keys(self, r: redis.Redis): await r.set("a", b"\xff") @@ -959,7 +959,7 @@ async def test_bitop_new_operations_with_empty_keys(self, r: redis.Redis): assert await r.get("empty_result4") is None @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") async def test_bitop_new_operations_return_values(self, r: redis.Redis): await r.set("a", b"\xff\x00\xff") await r.set("b", b"\x00\xff") diff --git a/tests/test_commands.py b/tests/test_commands.py index a6073cde98..9ac8ee4933 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1314,7 +1314,7 @@ def test_bitop_string_operands(self, r): assert int(binascii.hexlify(r["res3"]), 16) == 0x000000FF @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") def test_bitop_diff(self, r): r["a"] = b"\xf0" r["b"] = b"\xc0" @@ -1328,7 +1328,7 @@ def test_bitop_diff(self, r): assert r["result2"] == b"\xf0" @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") def test_bitop_diff1(self, r): r["a"] = b"\xf0" r["b"] = b"\xc0" @@ -1344,7 +1344,7 @@ def test_bitop_diff1(self, r): assert r["result2"] == b"\x00" @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") def test_bitop_andor(self, r): r["a"] = b"\xf0" r["b"] = b"\xc0" @@ -1360,7 +1360,7 @@ def test_bitop_andor(self, r): assert r["result2"] == b"\x00" @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") def test_bitop_one(self, r): r["a"] = b"\xf0" r["b"] = b"\xc0" @@ -1376,7 +1376,7 @@ def test_bitop_one(self, r): assert r["result2"] == b"\xff" @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") def test_bitop_new_operations_with_empty_keys(self, r): r["a"] = b"\xff" @@ -1393,7 +1393,7 @@ def test_bitop_new_operations_with_empty_keys(self, r): assert r.get("empty_result4") is None @pytest.mark.onlynoncluster - @skip_if_server_version_lt("8.2.0") + @skip_if_server_version_lt("8.1.224") def test_bitop_new_operations_return_values(self, r): r["a"] = b"\xff\x00\xff" r["b"] = b"\x00\xff"