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

Method test_geoadd_nx

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

Source from the content-addressed store, hash-verified

5759
5760 @skip_if_server_version_lt("6.2.0")
5761 def test_geoadd_nx(self, r):
5762 values = (2.1909389952632, 41.433791470673, "place1") + (
5763 2.1873744593677,
5764 41.406342043777,
5765 "place2",
5766 )
5767 assert r.geoadd("a", values) == 2
5768 values = (
5769 (2.1909389952632, 41.433791470673, "place1")
5770 + (2.1873744593677, 41.406342043777, "place2")
5771 + (2.1804738294738, 41.405647879212, "place3")
5772 )
5773 assert r.geoadd("a", values, nx=True) == 1
5774 assert r.zrange("a", 0, -1) == [b"place3", b"place2", b"place1"]
5775
5776 @skip_if_server_version_lt("6.2.0")
5777 def test_geoadd_xx(self, r):

Callers

nothing calls this directly

Calls 2

geoaddMethod · 0.80
zrangeMethod · 0.80

Tested by

no test coverage detected