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

Method test_pfcount

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

Source from the content-addressed store, hash-verified

5321 @pytest.mark.onlynoncluster
5322 @skip_if_server_version_lt("2.8.9")
5323 def test_pfcount(self, r):
5324 members = {b"1", b"2", b"3"}
5325 r.pfadd("a", *members)
5326 assert r.pfcount("a") == len(members)
5327 members_b = {b"2", b"3", b"4"}
5328 r.pfadd("b", *members_b)
5329 assert r.pfcount("b") == len(members_b)
5330 assert r.pfcount("a", "b") == len(members_b.union(members))
5331
5332 @pytest.mark.onlynoncluster
5333 @skip_if_server_version_lt("2.8.9")

Callers

nothing calls this directly

Calls 2

pfaddMethod · 0.80
pfcountMethod · 0.80

Tested by

no test coverage detected