Add test to make sure geodist with a missing member returns None
Fixes
@@ -1600,6 +1600,12 @@ class TestRedisCommands(object):
r.geoadd('barcelona', *values)
assert r.geodist('barcelona', 'place1', 'place2', 'km') == 3.0674
+ @skip_if_server_version_lt('3.2.0')
+ def test_geodist_missing_one_member(self, r):
+ values = (2.1909389952632, 41.433791470673, 'place1')
+ r.geoadd('barcelona', *values)
+ assert r.geodist('barcelona', 'place1', 'missing_member', 'km') is None
+
@skip_if_server_version_lt('3.2.0')
def test_geodist_invalid_units(self, r):
with pytest.raises(exceptions.RedisError):
