summaryrefslogtreecommitdiff
path: root/tests/test_pipeline.py
diff options
context:
space:
mode:
authorChayim I. Kirshen <c@kirshen.com>2021-11-29 20:07:20 +0200
committerChayim I. Kirshen <c@kirshen.com>2021-11-29 20:07:20 +0200
commit39fc550251d238cdba7966ff153321ca9e488508 (patch)
treee79360ec70feac7f0ab992813f8b2d43f7c67bab /tests/test_pipeline.py
parenta924269502b96dc71339cca3dfb20aaa3899a9d0 (diff)
parent4db85ef574a64a2b230a3ae1ff19c9d04065a114 (diff)
downloadredis-py-ck-linkdocs.tar.gz
merging masterck-linkdocs
Diffstat (limited to 'tests/test_pipeline.py')
-rw-r--r--tests/test_pipeline.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
index 08bd40b..a759bc9 100644
--- a/tests/test_pipeline.py
+++ b/tests/test_pipeline.py
@@ -59,6 +59,7 @@ class TestPipeline:
assert r['b'] == b'b1'
assert r['c'] == b'c1'
+ @pytest.mark.onlynoncluster
def test_pipeline_no_transaction_watch(self, r):
r['a'] = 0
@@ -70,6 +71,7 @@ class TestPipeline:
pipe.set('a', int(a) + 1)
assert pipe.execute() == [True]
+ @pytest.mark.onlynoncluster
def test_pipeline_no_transaction_watch_failure(self, r):
r['a'] = 0
@@ -129,6 +131,7 @@ class TestPipeline:
assert pipe.set('z', 'zzz').execute() == [True]
assert r['z'] == b'zzz'
+ @pytest.mark.onlynoncluster
def test_transaction_with_empty_error_command(self, r):
"""
Commands with custom EMPTY_ERROR functionality return their default
@@ -143,6 +146,7 @@ class TestPipeline:
assert result[1] == []
assert result[2]
+ @pytest.mark.onlynoncluster
def test_pipeline_with_empty_error_command(self, r):
"""
Commands with custom EMPTY_ERROR functionality return their default
@@ -171,6 +175,7 @@ class TestPipeline:
assert pipe.set('z', 'zzz').execute() == [True]
assert r['z'] == b'zzz'
+ @pytest.mark.onlynoncluster
def test_parse_error_raised_transaction(self, r):
with r.pipeline() as pipe:
pipe.multi()
@@ -186,6 +191,7 @@ class TestPipeline:
assert pipe.set('z', 'zzz').execute() == [True]
assert r['z'] == b'zzz'
+ @pytest.mark.onlynoncluster
def test_watch_succeed(self, r):
r['a'] = 1
r['b'] = 2
@@ -203,6 +209,7 @@ class TestPipeline:
assert pipe.execute() == [True]
assert not pipe.watching
+ @pytest.mark.onlynoncluster
def test_watch_failure(self, r):
r['a'] = 1
r['b'] = 2
@@ -217,6 +224,7 @@ class TestPipeline:
assert not pipe.watching
+ @pytest.mark.onlynoncluster
def test_watch_failure_in_empty_transaction(self, r):
r['a'] = 1
r['b'] = 2
@@ -230,6 +238,7 @@ class TestPipeline:
assert not pipe.watching
+ @pytest.mark.onlynoncluster
def test_unwatch(self, r):
r['a'] = 1
r['b'] = 2
@@ -242,6 +251,7 @@ class TestPipeline:
pipe.get('a')
assert pipe.execute() == [b'1']
+ @pytest.mark.onlynoncluster
def test_watch_exec_no_unwatch(self, r):
r['a'] = 1
r['b'] = 2
@@ -262,6 +272,7 @@ class TestPipeline:
unwatch_command = wait_for_command(r, m, 'UNWATCH')
assert unwatch_command is None, "should not send UNWATCH"
+ @pytest.mark.onlynoncluster
def test_watch_reset_unwatch(self, r):
r['a'] = 1
@@ -276,6 +287,7 @@ class TestPipeline:
assert unwatch_command is not None
assert unwatch_command['command'] == 'UNWATCH'
+ @pytest.mark.onlynoncluster
def test_transaction_callable(self, r):
r['a'] = 1
r['b'] = 2
@@ -300,6 +312,7 @@ class TestPipeline:
assert result == [True]
assert r['c'] == b'4'
+ @pytest.mark.onlynoncluster
def test_transaction_callable_returns_value_from_callable(self, r):
def callback(pipe):
# No need to do anything here since we only want the return value
@@ -354,6 +367,7 @@ class TestPipeline:
assert pipe == pipe2
assert response == [True, [0, 0, 15, 15, 14], b'1']
+ @pytest.mark.onlynoncluster
@skip_if_server_version_lt('2.0.0')
def test_pipeline_discard(self, r):