diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-11-25 15:37:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-25 15:37:58 +0200 |
commit | 20c5f0fa4676c4f0fde778dae81c3f96078348b5 (patch) | |
tree | 8813688ccaaf7ab0171604370ac402f4fe4671d7 | |
parent | d7b56103ed4d0ba9c05c74ca5580c72fcb70c09c (diff) | |
download | redis-py-20c5f0fa4676c4f0fde778dae81c3f96078348b5.tar.gz |
Fixing COMMAND GETKEYS tests (#1750)
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | tasks.py | 6 | ||||
-rw-r--r-- | tests/test_commands.py | 5 | ||||
-rw-r--r-- | tox.ini | 4 |
4 files changed, 10 insertions, 7 deletions
@@ -15,3 +15,5 @@ env venv coverage.xml .venv +*.xml +.coverage* @@ -41,15 +41,15 @@ def tests(c): with and without hiredis. """ print("Starting Redis tests") - run("tox -e '{redis,cluster}'-'{plain,hiredis}'") + run("tox -e '{standalone,cluster}'-'{plain,hiredis}'") @task -def redis_tests(c): +def standalone_tests(c): """Run all Redis tests against the current python, with and without hiredis.""" print("Starting Redis tests") - run("tox -e redis-'{hiredis}'") + run("tox -e standalone-'{hiredis}'") @task diff --git a/tests/test_commands.py b/tests/test_commands.py index b4d371a..f526ae5 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -3796,14 +3796,15 @@ class TestRedisCommands: assert isinstance(res, int) assert res >= 100 + @pytest.mark.onlynoncluster @skip_if_server_version_lt('2.8.13') def test_command_getkeys(self, r): res = r.command_getkeys('MSET', 'a', 'b', 'c', 'd', 'e', 'f') - assert res == [b'a', b'c', b'e'] + assert res == ['a', 'c', 'e'] res = r.command_getkeys('EVAL', '"not consulted"', '3', 'key1', 'key2', 'key3', 'arg1', 'arg2', 'arg3', 'argN') - assert res == [b'key1', b'key2', b'key3'] + assert res == ['key1', 'key2', 'key3'] @skip_if_server_version_lt('2.8.13') def test_command(self, r): @@ -3,12 +3,12 @@ addopts = -s markers = redismod: run only the redis module tests onlycluster: marks tests to be run only with cluster mode redis - onlynoncluster: marks tests to be run only with non-cluster redis + onlynoncluster: marks tests to be run only with standalone redis [tox] minversion = 3.2.0 requires = tox-docker -envlist = {redis,cluster}-{plain,hiredis}-{py35,py36,py37,py38,py39,pypy3},linters +envlist = {standalone,cluster}-{plain,hiredis}-{py35,py36,py37,py38,py39,pypy3},linters [docker:master] name = master |