summaryrefslogtreecommitdiff
path: root/tests/test_pubsub.py
diff options
context:
space:
mode:
authorAngusP <a7cp3ar50n@gmail.com>2017-01-24 23:20:19 +0000
committerAngusP <a7cp3ar50n@gmail.com>2017-01-24 23:20:19 +0000
commit4b110ebbd32e32e6bbc7780760ce77d66c72158c (patch)
tree681fcec02e73c1eb73692e2e0d93bfff9eb3d5e2 /tests/test_pubsub.py
parent54739783f344588cdbcd03dce6a3b37425c45218 (diff)
downloadredis-py-4b110ebbd32e32e6bbc7780760ce77d66c72158c.tar.gz
Add minimum Redis server version to TestPubSubPubSubSubcommands
Diffstat (limited to 'tests/test_pubsub.py')
-rw-r--r--tests/test_pubsub.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_pubsub.py b/tests/test_pubsub.py
index dfda868..a240248 100644
--- a/tests/test_pubsub.py
+++ b/tests/test_pubsub.py
@@ -7,6 +7,7 @@ from redis.exceptions import ConnectionError
from redis._compat import basestring, u, unichr, b
from .conftest import r as _redis_client
+from .conftest import skip_if_server_version_lt
def wait_for_message(pubsub, timeout=0.1, ignore_subscribe_messages=False):
@@ -402,12 +403,14 @@ class TestPubSubRedisDown(object):
class TestPubSubPubSubSubcommands(object):
+ @skip_if_server_version_lt('2.8.0')
def test_pubsub_channels(self, r):
p = r.pubsub(ignore_subscribe_messages=True)
p.subscribe('foo', 'bar', 'baz', 'quux')
channels = sorted(r.pubsub_channels())
assert channels == [b('bar'), b('baz'), b('foo'), b('quux')]
+ @skip_if_server_version_lt('2.8.0')
def test_pubsub_numsub(self, r):
p1 = r.pubsub(ignore_subscribe_messages=True)
p1.subscribe('foo', 'bar', 'baz')
@@ -419,6 +422,7 @@ class TestPubSubPubSubSubcommands(object):
channels = [(b('foo'), 1), (b('bar'), 2), (b('baz'), 3)]
assert channels == r.pubsub_numsub('foo', 'bar', 'baz')
+ @skip_if_server_version_lt('2.8.0')
def test_pubsub_numpat(self, r):
p = r.pubsub(ignore_subscribe_messages=True)
p.psubscribe('*oo', '*ar', 'b*z')