diff --git a/redis/commands/core.py b/redis/commands/core.py index 1d0be8afd6..e6ab0095c8 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -900,7 +900,9 @@ def select(self, index: int, **kwargs) -> ResponseT: """ return self.execute_command("SELECT", index, **kwargs) - def info(self, section: Union[str, None] = None, **kwargs) -> ResponseT: + def info( + self, section: Union[str, None] = None, *args: List[str], **kwargs + ) -> ResponseT: """ Returns a dictionary containing information about the Redis server @@ -915,7 +917,7 @@ def info(self, section: Union[str, None] = None, **kwargs) -> ResponseT: if section is None: return self.execute_command("INFO", **kwargs) else: - return self.execute_command("INFO", section, **kwargs) + return self.execute_command("INFO", section, *args, **kwargs) def lastsave(self, **kwargs) -> ResponseT: """ diff --git a/tests/test_commands.py b/tests/test_commands.py index aa29e6f7cf..05a90f293c 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -727,6 +727,14 @@ def test_info(self, r): assert "arch_bits" in info.keys() assert "redis_version" in info.keys() + @pytest.mark.onlynoncluster + @skip_if_server_version_lt("7.0.0") + def test_info_multi_sections(self, r): + res = r.info("clients", "server") + assert isinstance(res, dict) + assert "redis_version" in res + assert "connected_clients" in res + @pytest.mark.onlynoncluster @skip_if_redis_enterprise() def test_lastsave(self, r):