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

Method test_cluster_pfcount

tests/test_cluster.py:2516–2523  ·  view source on GitHub ↗
(self, r)

Source from the content-addressed store, hash-verified

2514
2515 @skip_if_server_version_lt("2.8.9")
2516 def test_cluster_pfcount(self, r):
2517 members = {b"1", b"2", b"3"}
2518 r.pfadd("{foo}a", *members)
2519 assert r.pfcount("{foo}a") == len(members)
2520 members_b = {b"2", b"3", b"4"}
2521 r.pfadd("{foo}b", *members_b)
2522 assert r.pfcount("{foo}b") == len(members_b)
2523 assert r.pfcount("{foo}a", "{foo}b") == len(members_b.union(members))
2524
2525 @skip_if_server_version_lt("2.8.9")
2526 def test_cluster_pfmerge(self, r):

Callers

nothing calls this directly

Calls 2

pfaddMethod · 0.80
pfcountMethod · 0.80

Tested by

no test coverage detected