From 89373ebec1e3f5c0b491e19ed74b33267f909c48 Mon Sep 17 00:00:00 2001 From: AvitalFineRedis Date: Mon, 8 Nov 2021 15:51:39 +0100 Subject: [PATCH 1/2] fix georadius test (version issues) --- tests/test_commands.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_commands.py b/tests/test_commands.py index 723612af6b..8046f12607 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -2744,7 +2744,7 @@ def test_georadius_with(self, r): assert r.georadius('barcelona', 2, 1, 1, unit='km', withdist=True, withcoord=True, withhash=True) == [] - @skip_if_server_version_lt('3.2.0') + @skip_if_server_version_lt('6.2.0') def test_georadius_count(self, r): values = (2.1909389952632, 41.433791470673, 'place1') + \ (2.1873744593677, 41.406342043777, 'place2') @@ -2806,6 +2806,12 @@ def test_georadiusmember(self, r): (2.187376320362091, 41.40634178640635)], [b'place1', 0.0, 3471609698139488, (2.1909382939338684, 41.433790281840835)]] + + @skip_if_server_version_lt('6.2.0') + def test_georadiusmember_count(self, r): + values = (2.1909389952632, 41.433791470673, 'place1') + \ + (2.1873744593677, 41.406342043777, b'\x80place2') + assert r.georadiusbymember('barcelona', 'place1', 4000, count=1, any=True) == \ [b'\x80place2'] From 8abd72effaa127282b160c41e65d48a689393117 Mon Sep 17 00:00:00 2001 From: AvitalFineRedis Date: Mon, 8 Nov 2021 15:56:33 +0100 Subject: [PATCH 2/2] stam --- tests/test_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_commands.py b/tests/test_commands.py index 8046f12607..9b850305b7 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -2811,7 +2811,7 @@ def test_georadiusmember(self, r): def test_georadiusmember_count(self, r): values = (2.1909389952632, 41.433791470673, 'place1') + \ (2.1873744593677, 41.406342043777, b'\x80place2') - + r.geoadd('barcelona', values) assert r.georadiusbymember('barcelona', 'place1', 4000, count=1, any=True) == \ [b'\x80place2']