summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-11-14 12:50:06 +0200
committerGitHub <noreply@github.com>2021-11-14 12:50:06 +0200
commite881976023cfc381aeaaec580c4b10b9ba62c0b6 (patch)
treef9fbf62fd3d79cfb8c82e8181406617956835419 /tests
parent6a293e685d27894bc99ea4c0c7312c81f099ca45 (diff)
downloadredis-py-e881976023cfc381aeaaec580c4b10b9ba62c0b6.tar.gz
Added breaking icon to release drafter (#1702)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_commands.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index df561d4..6cb1a78 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -1208,6 +1208,12 @@ class TestRedisCommands:
value1 = 'ohmytext'
value2 = 'mynewtext'
res = 'mytext'
+
+ if skip_if_redis_enterprise(None).args[0] is True:
+ with pytest.raises(redis.exceptions.ResponseError):
+ assert r.stralgo('LCS', value1, value2) == res
+ return
+
# test LCS of strings
assert r.stralgo('LCS', value1, value2) == res
# test using keys
@@ -1250,6 +1256,12 @@ class TestRedisCommands:
def test_substr(self, r):
r['a'] = '0123456789'
+
+ if skip_if_redis_enterprise(None).args[0] is True:
+ with pytest.raises(redis.exceptions.ResponseError):
+ assert r.substr('a', 0) == b'0123456789'
+ return
+
assert r.substr('a', 0) == b'0123456789'
assert r.substr('a', 2) == b'23456789'
assert r.substr('a', 3, 5) == b'345'
@@ -3617,6 +3629,11 @@ class TestRedisCommands:
@skip_if_server_version_lt('4.0.0')
def test_memory_malloc_stats(self, r):
+ if skip_if_redis_enterprise(None).args[0] is True:
+ with pytest.raises(redis.exceptions.ResponseError):
+ assert r.memory_malloc_stats()
+ return
+
assert r.memory_malloc_stats()
@skip_if_server_version_lt('4.0.0')
@@ -3624,6 +3641,12 @@ class TestRedisCommands:
# put a key into the current db to make sure that "db.<current-db>"
# has data
r.set('foo', 'bar')
+
+ if skip_if_redis_enterprise(None).args[0] is True:
+ with pytest.raises(redis.exceptions.ResponseError):
+ stats = r.memory_stats()
+ return
+
stats = r.memory_stats()
assert isinstance(stats, dict)
for key, value in stats.items():