diff --git a/python/python/tests/test_async_client.py b/python/python/tests/test_async_client.py index 4dbd55ddda..ff3249e829 100644 --- a/python/python/tests/test_async_client.py +++ b/python/python/tests/test_async_client.py @@ -1195,6 +1195,23 @@ async def test_geoadd(self, redis_client: TRedisClient): with pytest.raises(RequestError): await redis_client.geoadd(key2, members_coordinates) + @pytest.mark.parametrize("cluster_mode", [True, False]) + @pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3]) + async def test_geoadd_invalid_coordinates(self, redis_client: TRedisClient): + key = get_random_string(10) + + with pytest.raises(RequestError): + await redis_client.geoadd(key, {"Place": Coordinate(-181, 0)}) + + with pytest.raises(RequestError): + await redis_client.geoadd(key, {"Place": Coordinate(181, 0)}) + + with pytest.raises(RequestError): + await redis_client.geoadd(key, {"Place": Coordinate(0, 86)}) + + with pytest.raises(RequestError): + await redis_client.geoadd(key, {"Place": Coordinate(0, -86)}) + @pytest.mark.parametrize("cluster_mode", [True, False]) @pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3]) async def test_zadd_zaddincr(self, redis_client: TRedisClient):