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

Method test_scan

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

Source from the content-addressed store, hash-verified

4152 @pytest.mark.onlynoncluster
4153 @skip_if_server_version_lt("2.8.0")
4154 def test_scan(self, r):
4155 r.set("a", 1)
4156 r.set("b", 2)
4157 r.set("c", 3)
4158 cursor, keys = r.scan()
4159 assert cursor == 0
4160 assert set(keys) == {b"a", b"b", b"c"}
4161 _, keys = r.scan(match="a")
4162 assert set(keys) == {b"a"}
4163
4164 @pytest.mark.onlynoncluster
4165 @skip_if_server_version_lt("6.0.0")

Callers

nothing calls this directly

Calls 2

scanMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected