MCPcopy
hub / github.com/redis/redis-py / test_bitop_string_operands

Method test_bitop_string_operands

tests/test_commands.py:1656–1664  ·  view source on GitHub ↗
(self, r)

Source from the content-addressed store, hash-verified

1654 @pytest.mark.onlynoncluster
1655 @skip_if_server_version_lt("2.6.0")
1656 def test_bitop_string_operands(self, r):
1657 r["a"] = b"\x01\x02\xff\xff"
1658 r["b"] = b"\x01\x02\xff"
1659 r.bitop("and", "res1", "a", "b")
1660 r.bitop("or", "res2", "a", "b")
1661 r.bitop("xor", "res3", "a", "b")
1662 assert int(binascii.hexlify(r["res1"]), 16) == 0x0102FF00
1663 assert int(binascii.hexlify(r["res2"]), 16) == 0x0102FFFF
1664 assert int(binascii.hexlify(r["res3"]), 16) == 0x000000FF
1665
1666 @pytest.mark.onlynoncluster
1667 @skip_if_server_version_lt("8.1.224")

Callers

nothing calls this directly

Calls 1

bitopMethod · 0.80

Tested by

no test coverage detected