summaryrefslogtreecommitdiff
path: root/tests/test_pipeline.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pipeline.py')
-rw-r--r--tests/test_pipeline.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
index 08b7fba..867666b 100644
--- a/tests/test_pipeline.py
+++ b/tests/test_pipeline.py
@@ -242,6 +242,14 @@ class TestPipeline(object):
assert result == [True]
assert r['c'] == b'4'
+ 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
+ return 'a'
+
+ res = r.transaction(callback, 'my-key', value_from_callable=True)
+ assert res == 'a'
+
def test_exec_error_in_no_transaction_pipeline(self, r):
r['a'] = 1
with r.pipeline(transaction=False) as pipe: