summaryrefslogtreecommitdiff
path: root/tests/test_timeseries.py
diff options
context:
space:
mode:
authorChayim I. Kirshen <c@kirshen.com>2021-11-09 10:57:20 +0200
committerChayim I. Kirshen <c@kirshen.com>2021-11-09 10:57:20 +0200
commit0e73a4e510b62026164f85e35997e0d1e913e3a4 (patch)
treec41aa89b1a6d2aa3aaf7684b36b4a932c93881bd /tests/test_timeseries.py
parentbba75187931af84dd21c91bcf1b3bd422c9aed72 (diff)
downloadredis-py-ck-jsonts-pipelines.tar.gz
Migrating pipeline support for JSON and TSck-jsonts-pipelines
Diffstat (limited to 'tests/test_timeseries.py')
-rw-r--r--tests/test_timeseries.py31
1 files changed, 13 insertions, 18 deletions
diff --git a/tests/test_timeseries.py b/tests/test_timeseries.py
index b2df3fe..d3d474f 100644
--- a/tests/test_timeseries.py
+++ b/tests/test_timeseries.py
@@ -49,10 +49,6 @@ def testAlter(client):
assert 10 == client.ts().info(1).retention_msecs
-# pipe = client.ts().pipeline()
-# assert pipe.create(2)
-
-
@pytest.mark.redismod
@skip_ifmodversion_lt("1.4.0", "timeseries")
def testAlterDiplicatePolicy(client):
@@ -568,20 +564,19 @@ def testQueryIndex(client):
assert [2] == client.ts().queryindex(["Taste=That"])
-#
-# @pytest.mark.redismod
-# @pytest.mark.pipeline
-# def testPipeline(client):
-# pipeline = client.ts().pipeline()
-# pipeline.create("with_pipeline")
-# for i in range(100):
-# pipeline.add("with_pipeline", i, 1.1 * i)
-# pipeline.execute()
-
-# info = client.ts().info("with_pipeline")
-# assert info.lastTimeStamp == 99
-# assert info.total_samples == 100
-# assert client.ts().get("with_pipeline")[1] == 99 * 1.1
+@pytest.mark.redismod
+@pytest.mark.pipeline
+def test_pipeline(client):
+ pipeline = client.ts().pipeline()
+ pipeline.create("with_pipeline")
+ for i in range(100):
+ pipeline.add("with_pipeline", i, 1.1 * i)
+ pipeline.execute()
+
+ info = client.ts().info("with_pipeline")
+ assert info.lastTimeStamp == 99
+ assert info.total_samples == 100
+ assert client.ts().get("with_pipeline")[1] == 99 * 1.1
@pytest.mark.redismod