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

Method test_rpoplpush

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

Source from the content-addressed store, hash-verified

4004
4005 @pytest.mark.onlynoncluster
4006 def test_rpoplpush(self, r):
4007 r.rpush("a", "a1", "a2", "a3")
4008 r.rpush("b", "b1", "b2", "b3")
4009 assert r.rpoplpush("a", "b") == b"a3"
4010 assert r.lrange("a", 0, -1) == [b"a1", b"a2"]
4011 assert r.lrange("b", 0, -1) == [b"a3", b"b1", b"b2", b"b3"]
4012
4013 def test_rpush(self, r):
4014 assert r.rpush("a", "1") == 1

Callers

nothing calls this directly

Calls 3

rpushMethod · 0.80
rpoplpushMethod · 0.80
lrangeMethod · 0.80

Tested by

no test coverage detected