We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JSON.ARRINDEX
1 parent 74c251a commit f28a9f5Copy full SHA for f28a9f5
tests/test_json.py
@@ -1326,17 +1326,10 @@ def test_arrindex_dollar(client):
1326
[],
1327
]
1328
1329
- # Fail with none-scalar value
1330
- with pytest.raises(exceptions.ResponseError):
1331
- client.json().arrindex("test_None", "$..nested42_empty_arr.arr", {"arr": []})
1332
-
1333
- # Do not fail with none-scalar value in legacy mode
1334
- assert (
1335
- client.json().arrindex(
1336
- "test_None", ".[4][1].nested42_empty_arr.arr", '{"arr":[]}'
1337
- )
1338
- == -1
1339
+ # Test with none-scalar value
+ assert client.json().arrindex(
+ "test_None", "$..nested42_empty_arr.arr", {"arr": []}
+ ) == [-1]
1340
1341
# Test legacy (path begins with dot)
1342
# Test index of int scalar in single value
0 commit comments