Skip to content

Commit 20c5f0f

Browse files
authored
Fixing COMMAND GETKEYS tests (#1750)
1 parent d7b5610 commit 20c5f0f

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ env
1515
venv
1616
coverage.xml
1717
.venv
18+
*.xml
19+
.coverage*

tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ def tests(c):
4141
with and without hiredis.
4242
"""
4343
print("Starting Redis tests")
44-
run("tox -e '{redis,cluster}'-'{plain,hiredis}'")
44+
run("tox -e '{standalone,cluster}'-'{plain,hiredis}'")
4545

4646

4747
@task
48-
def redis_tests(c):
48+
def standalone_tests(c):
4949
"""Run all Redis tests against the current python,
5050
with and without hiredis."""
5151
print("Starting Redis tests")
52-
run("tox -e redis-'{hiredis}'")
52+
run("tox -e standalone-'{hiredis}'")
5353

5454

5555
@task

tests/test_commands.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3796,14 +3796,15 @@ def test_command_count(self, r):
37963796
assert isinstance(res, int)
37973797
assert res >= 100
37983798

3799+
@pytest.mark.onlynoncluster
37993800
@skip_if_server_version_lt('2.8.13')
38003801
def test_command_getkeys(self, r):
38013802
res = r.command_getkeys('MSET', 'a', 'b', 'c', 'd', 'e', 'f')
3802-
assert res == [b'a', b'c', b'e']
3803+
assert res == ['a', 'c', 'e']
38033804
res = r.command_getkeys('EVAL', '"not consulted"',
38043805
'3', 'key1', 'key2', 'key3',
38053806
'arg1', 'arg2', 'arg3', 'argN')
3806-
assert res == [b'key1', b'key2', b'key3']
3807+
assert res == ['key1', 'key2', 'key3']
38073808

38083809
@skip_if_server_version_lt('2.8.13')
38093810
def test_command(self, r):

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ addopts = -s
33
markers =
44
redismod: run only the redis module tests
55
onlycluster: marks tests to be run only with cluster mode redis
6-
onlynoncluster: marks tests to be run only with non-cluster redis
6+
onlynoncluster: marks tests to be run only with standalone redis
77

88
[tox]
99
minversion = 3.2.0
1010
requires = tox-docker
11-
envlist = {redis,cluster}-{plain,hiredis}-{py35,py36,py37,py38,py39,pypy3},linters
11+
envlist = {standalone,cluster}-{plain,hiredis}-{py35,py36,py37,py38,py39,pypy3},linters
1212

1313
[docker:master]
1414
name = master

0 commit comments

Comments
 (0)