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

Method test_lpushx

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

Source from the content-addressed store, hash-verified

3359 assert r.lrange("a", 0, -1) == [b"4", b"3", b"2", b"1"]
3360
3361 def test_lpushx(self, r):
3362 assert r.lpushx("a", "1") == 0
3363 assert r.lrange("a", 0, -1) == []
3364 r.rpush("a", "1", "2", "3")
3365 assert r.lpushx("a", "4") == 4
3366 assert r.lrange("a", 0, -1) == [b"4", b"1", b"2", b"3"]
3367
3368 @skip_if_server_version_lt("4.0.0")
3369 def test_lpushx_with_list(self, r):

Callers

nothing calls this directly

Calls 3

lpushxMethod · 0.80
lrangeMethod · 0.80
rpushMethod · 0.80

Tested by

no test coverage detected