diff options
-rw-r--r-- | redis/commands.py | 10 | ||||
-rw-r--r-- | tests/test_commands.py | 20 |
2 files changed, 30 insertions, 0 deletions
diff --git a/redis/commands.py b/redis/commands.py index cd3b802..62c082d 100644 --- a/redis/commands.py +++ b/redis/commands.py @@ -485,6 +485,11 @@ class Commands: """Returns version specific meta information about a given key""" return self.execute_command('DEBUG OBJECT', key) + def debug_segfault(self): + raise NotImplementedError( + "DEBUG SEGFAULT is intentionally not implemented in the client." + ) + def echo(self, value): """Echo the string back from the server""" return self.execute_command('ECHO', value) @@ -2894,6 +2899,11 @@ class Commands: """ return self.execute_command('SCRIPT EXISTS', *args) + def script_debug(self, *args): + raise NotImplementedError( + "SCRIPT DEBUG is intentionally not implemented in the client." + ) + def script_flush(self, sync_type="SYNC"): """Flush all scripts from the script cache. ``sync_type`` is by default SYNC (synchronous) but it can also be diff --git a/tests/test_commands.py b/tests/test_commands.py index 62d42db..a7a3ce4 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1629,6 +1629,16 @@ class TestRedisCommands: assert r.sunionstore('c', 'a', 'b') == 3 assert r.smembers('c') == {b'1', b'2', b'3'} + @skip_if_server_version_lt('1.0.0') + def test_debug_segfault(self, r): + with pytest.raises(NotImplementedError): + r.debug_segfault() + + @skip_if_server_version_lt('3.2.0') + def test_script_debug(self, r): + with pytest.raises(NotImplementedError): + r.script_debug() + # SORTED SET COMMANDS def test_zadd(self, r): mapping = {'a1': 1.0, 'a2': 2.0, 'a3': 3.0} @@ -3536,6 +3546,16 @@ class TestRedisCommands: assert resp == [0, None, 255] @skip_if_server_version_lt('4.0.0') + def test_memory_help(self, r): + with pytest.raises(NotImplementedError): + r.memory_help() + + @skip_if_server_version_lt('4.0.0') + def test_memory_doctor(self, r): + with pytest.raises(NotImplementedError): + r.memory_doctor() + + @skip_if_server_version_lt('4.0.0') def test_memory_malloc_stats(self, r): assert r.memory_malloc_stats() |