summaryrefslogtreecommitdiff
path: root/tests/test_json.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_json.py')
-rw-r--r--tests/test_json.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_json.py b/tests/test_json.py
index a776e9e..8e8da05 100644
--- a/tests/test_json.py
+++ b/tests/test_json.py
@@ -166,6 +166,11 @@ def test_arrindex(client):
client.json().set("arr", Path.root_path(), [0, 1, 2, 3, 4])
assert 1 == client.json().arrindex("arr", Path.root_path(), 1)
assert -1 == client.json().arrindex("arr", Path.root_path(), 1, 2)
+ assert 4 == client.json().arrindex("arr", Path.root_path(), 4)
+ assert 4 == client.json().arrindex("arr", Path.root_path(), 4, start=0)
+ assert 4 == client.json().arrindex("arr", Path.root_path(), 4, start=0, stop=5000)
+ assert -1 == client.json().arrindex("arr", Path.root_path(), 4, start=0, stop=-1)
+ assert -1 == client.json().arrindex("arr", Path.root_path(), 4, start=1, stop=3)
@pytest.mark.redismod