summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-11-25 15:37:58 +0200
committerGitHub <noreply@github.com>2021-11-25 15:37:58 +0200
commit20c5f0fa4676c4f0fde778dae81c3f96078348b5 (patch)
tree8813688ccaaf7ab0171604370ac402f4fe4671d7
parentd7b56103ed4d0ba9c05c74ca5580c72fcb70c09c (diff)
downloadredis-py-20c5f0fa4676c4f0fde778dae81c3f96078348b5.tar.gz
Fixing COMMAND GETKEYS tests (#1750)
-rw-r--r--.gitignore2
-rw-r--r--tasks.py6
-rw-r--r--tests/test_commands.py5
-rw-r--r--tox.ini4
4 files changed, 10 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 05c3846..08138d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,5 @@ env
venv
coverage.xml
.venv
+*.xml
+.coverage*
diff --git a/tasks.py b/tasks.py
index 138ca69..137d177 100644
--- a/tasks.py
+++ b/tasks.py
@@ -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):
diff --git a/tox.ini b/tox.ini
index c68dab1..0a94db8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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