MCPcopy
hub / github.com/redis/redis-py / test_range

Function test_range

tests/test_timeseries.py:259–270  ·  view source on GitHub ↗
(client)

Source from the content-addressed store, hash-verified

257
258@pytest.mark.redismod
259def test_range(client):
260 for i in range(100):
261 client.ts().add(1, i, i % 7)
262 assert 100 == len(client.ts().range(1, 0, 200))
263 for i in range(100):
264 client.ts().add(1, i + 200, i % 7)
265 assert 200 == len(client.ts().range(1, 0, 500))
266 # last sample isn't returned
267 assert 20 == len(
268 client.ts().range(1, 0, 500, aggregation_type="avg", bucket_size_msec=10)
269 )
270 assert 10 == len(client.ts().range(1, 0, 500, count=10))
271
272
273@pytest.mark.redismod

Callers

nothing calls this directly

Calls 3

rangeMethod · 0.80
addMethod · 0.45
tsMethod · 0.45

Tested by

no test coverage detected