Skip to content

Conversation

@dvora-h
Copy link
Collaborator

@dvora-h dvora-h commented Apr 26, 2022

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

closes #2122

@dvora-h dvora-h added feature New feature redis-7 labels Apr 26, 2022
@dvora-h dvora-h requested a review from chayim April 26, 2022 14:41
For more information see https://redis.io/commands/config-set
"""
return self.execute_command("CONFIG SET", name, value, **kwargs)
return self.execute_command("CONFIG SET", name, value, *args, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean.


@skip_if_server_version_lt("7.0.0")
@skip_if_redis_enterprise()
def test_config_set_multi_params(self, r: redis.Redis):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a lazy, future option for writing tests like this (psuedocode). It comes from a pattern used in go:

x = [('timeout', 70), ('maxmemory', 100)] r.config_set(*x) for y in x: assert r.config_get(x[0]) == x[1] 
@dvora-h dvora-h merged commit c198612 into redis:master Apr 27, 2022
@dvora-h dvora-h deleted the config-set branch May 9, 2022 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants