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

Method test_bitcount_mode

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

Source from the content-addressed store, hash-verified

1607
1608 @skip_if_server_version_lt("7.0.0")
1609 def test_bitcount_mode(self, r):
1610 r.set("mykey", "foobar")
1611 assert r.bitcount("mykey") == 26
1612 assert r.bitcount("mykey", 1, 1, "byte") == 6
1613 assert r.bitcount("mykey", 5, 30, "bit") == 17
1614 with pytest.raises(redis.ResponseError):
1615 assert r.bitcount("mykey", 5, 30, "but")
1616
1617 @pytest.mark.onlynoncluster
1618 @skip_if_server_version_lt("2.6.0")

Callers

nothing calls this directly

Calls 2

bitcountMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected