summaryrefslogtreecommitdiff
path: root/tests/pipeline.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pipeline.py')
-rw-r--r--tests/pipeline.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pipeline.py b/tests/pipeline.py
index a21c882..198ee58 100644
--- a/tests/pipeline.py
+++ b/tests/pipeline.py
@@ -185,3 +185,18 @@ class PipelineTestCase(unittest.TestCase):
result = self.client.transaction(my_transaction, 'a', 'b')
self.assertEquals(result, [True])
self.assertEquals(self.client.get('c'), b('4'))
+
+ def test_error_in_simple_pipeline(self):
+ self.client.hmset('x', {'a': 'b'})
+ with self.client.pipeline(transaction=False) as pipe:
+ pipe.llen('x')
+ pipe.expire('x', 100)
+ try:
+ pipe.execute()
+ except redis.ResponseError:
+ pass
+ else:
+ raise
+
+ ret = self.client.hgetall('x')
+ self.assertEqual(ret, {b('a'): b('b')})