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

Function test_del_range

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

Source from the content-addressed store, hash-verified

243@pytest.mark.redismod
244@skip_ifmodversion_lt("1.10.0", "timeseries")
245def test_del_range(client):
246 try:
247 client.ts().delete("test", 0, 100)
248 except redis.ResponseError as e:
249 assert "key does not exist" in str(e)
250
251 for i in range(100):
252 client.ts().add(1, i, i % 7)
253 assert 22 == client.ts().delete(1, 0, 21)
254 assert [] == client.ts().range(1, 0, 21)
255 assert_resp_response(client, client.ts().range(1, 22, 22), [(22, 1.0)], [[22, 1.0]])
256
257
258@pytest.mark.redismod

Callers

nothing calls this directly

Calls 5

assert_resp_responseFunction · 0.85
rangeMethod · 0.80
deleteMethod · 0.45
tsMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected