diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-11-14 13:09:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-14 13:09:43 +0200 |
commit | 19819e08211cc12f85c45294ad6209b2d5626337 (patch) | |
tree | 5aa18d6303a6ba43ccfebac17df77c33ffe8ee92 /tests/conftest.py | |
parent | 5b72987e80a7765ce6e464232a7f1519243d0a73 (diff) | |
download | redis-py-19819e08211cc12f85c45294ad6209b2d5626337.tar.gz |
Unit tests fixes for compatibility (#1703)
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index bb682f7..31d3fbd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,12 +31,10 @@ def pytest_addoption(parser): def _get_info(redis_url): client = redis.Redis.from_url(redis_url) info = client.info() - try: - client.execute_command("CONFIG SET maxmemory 5555555") - client.execute_command("CONFIG SET maxmemory 0") - info["enterprise"] = False - except redis.exceptions.ResponseError: + if 'dping' in client.__commands__: info["enterprise"] = True + else: + info["enterprise"] = False client.connection_pool.disconnect() return info @@ -57,6 +55,8 @@ def pytest_sessionstart(session): REDIS_INFO["modules"] = info["modules"] except redis.exceptions.ConnectionError: pass + except KeyError: + pass def skip_if_server_version_lt(min_version): |