1
0
Fork 0

Merging upstream version 1.12.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 17:09:15 +01:00
parent d6445459ac
commit 7865f9a813
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
20 changed files with 536 additions and 80 deletions

View file

@ -9,31 +9,37 @@ def test_geoadd(judge_command):
"member": '"Catania"',
},
)
def test_georadiusbymember(judge_command):
judge_command(
"GEORADIUSBYMEMBER Sicily Agrigento 100 km",
'GEOADD Sicily NX CH 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania"',
{
"command": "GEORADIUSBYMEMBER",
"command": "GEOADD",
"condition": "NX",
"changed": "CH",
"key": "Sicily",
"member": "Agrigento",
"float": "100",
"distunit": "km",
"longitude": "15.087269",
"latitude": "37.502669",
"member": '"Catania"',
},
)
def test_georadius(judge_command):
def test_geosearch(judge_command):
judge_command(
"GEORADIUS Sicily 15 37 200 km WITHDIST WITHCOORD ",
"GEOSEARCH Sicily FROMLONLAT 15 37 BYBOX 400 400 km ASC WITHCOORD WITHDIST",
{
"command": "GEORADIUS",
"command": "GEOSEARCH",
"key": "Sicily",
"longitude": "15",
"latitude": "37",
"float": "200",
"distunit": "km",
"geochoice": "WITHCOORD",
"any": "FROMLONLAT 15 37 BYBOX 400 400 km ASC WITHCOORD WITHDIST",
},
)
def test_geosearchstore(judge_command):
judge_command(
"GEOSEARCHSTORE key2 Sicily FROMLONLAT 15 37 BYBOX 400 400 km ASC COUNT 3 STOREDIST",
{
"command": "GEOSEARCHSTORE",
"key": ["Sicily", "key2"],
"any": "FROMLONLAT 15 37 BYBOX 400 400 km ASC COUNT 3 STOREDIST",
},
)