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

Method test_lmpop

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

Source from the content-addressed store, hash-verified

3312 @pytest.mark.onlynoncluster
3313 @skip_if_server_version_lt("7.0.0")
3314 def test_lmpop(self, r):
3315 r.rpush("foo", "1", "2", "3", "4", "5")
3316 result = [b"foo", [b"1", b"2"]]
3317 assert r.lmpop("2", "bar", "foo", direction="LEFT", count=2) == result
3318 with pytest.raises(redis.ResponseError):
3319 r.lmpop("2", "bar", "foo", direction="up", count=2)
3320 r.rpush("bar", "a", "b", "c", "d")
3321 assert r.lmpop("2", "bar", "foo", direction="LEFT") == [b"bar", [b"a"]]
3322
3323 def test_lindex(self, r):
3324 r.rpush("a", "1", "2", "3")

Callers

nothing calls this directly

Calls 2

rpushMethod · 0.80
lmpopMethod · 0.80

Tested by

no test coverage detected