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

Method test_zdiffstore

tests/test_asyncio/test_commands.py:3514–3520  ·  view source on GitHub ↗
(self, r)

Source from the content-addressed store, hash-verified

3512 @pytest.mark.onlynoncluster
3513 @skip_if_server_version_lt("6.2.0")
3514 async def test_zdiffstore(self, r):
3515 await r.zadd("a", {"a1": 1, "a2": 2, "a3": 3})
3516 await r.zadd("b", {"a1": 1, "a2": 2})
3517 assert await r.zdiffstore("out", ["a", "b"])
3518 assert await r.zrange("out", 0, -1) == [b"a3"]
3519 response = await r.zrange("out", 0, -1, withscores=True)
3520 assert_resp_response(r, response, [(b"a3", 3.0)], [[b"a3", 3.0]])
3521
3522 async def test_zincrby(self, r: redis.Redis):
3523 await r.zadd("a", {"a1": 1, "a2": 2, "a3": 3})

Callers

nothing calls this directly

Calls 4

assert_resp_responseFunction · 0.90
zaddMethod · 0.80
zdiffstoreMethod · 0.80
zrangeMethod · 0.80

Tested by

no test coverage detected