diff options
-rw-r--r-- | redis/commands/core.py | 28 | ||||
-rw-r--r-- | tests/test_commands.py | 10 |
2 files changed, 38 insertions, 0 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py index 1625e10..2ebd35f 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -980,6 +980,34 @@ class ManagementCommands(CommandsProtocol): """ return self.execute_command("LASTSAVE", **kwargs) + def latency_doctor(self): + """Raise a NotImplementedError, as the client will not support LATENCY DOCTOR. + This funcion is best used within the redis-cli. + + For more information see https://redis.io/commands/latency-doctor + """ + raise NotImplementedError( + """ + LATENCY DOCTOR is intentionally not implemented in the client. + + For more information see https://redis.io/commands/latency-doctor + """ + ) + + def latency_graph(self): + """Raise a NotImplementedError, as the client will not support LATENCY GRAPH. + This funcion is best used within the redis-cli. + + For more information see https://redis.io/commands/latency-graph. + """ + raise NotImplementedError( + """ + LATENCY GRAPH is intentionally not implemented in the client. + + For more information see https://redis.io/commands/latency-graph + """ + ) + def lolwut(self, *version_numbers: Union[str, float], **kwargs) -> ResponseT: """ Get the Redis version and a piece of generative computer art diff --git a/tests/test_commands.py b/tests/test_commands.py index aa6745b..77e2e72 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -4527,6 +4527,16 @@ class TestRedisCommands: with pytest.raises(NotImplementedError): r.latency_histogram() + @skip_if_server_version_lt("7.0.0") + def test_latency_graph_not_implemented(self, r: redis.Redis): + with pytest.raises(NotImplementedError): + r.latency_graph() + + @skip_if_server_version_lt("7.0.0") + def test_latency_doctor_not_implemented(self, r: redis.Redis): + with pytest.raises(NotImplementedError): + r.latency_doctor() + @pytest.mark.onlynoncluster @skip_if_server_version_lt("4.0.0") @skip_if_redis_enterprise() |