Skip to content

Commit 5ee5f35

Browse files
committed
Add some not implemented tests
1 parent 1d16980 commit 5ee5f35

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_examples.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,15 @@
3737
("$..book[-1:]", Child(Descendants(Root(), Fields("book")), Slice(start=-1))),
3838
#
3939
# The first two books
40-
# "$..book[0,1]" # Not implemented
40+
("$..book[0,1]", Child(Descendants(Root(), Fields("book")), Index(0,1))),
4141
("$..book[:2]", Child(Descendants(Root(), Fields("book")), Slice(end=2))),
4242
#
43+
# Categories and authors of all books
44+
(
45+
"$..book[0][category,author]",
46+
Child(Child(Descendants(Root(), Fields('book')), Index(0)), Fields('category','author')),
47+
),
48+
#
4349
# Filter all books with an ISBN
4450
(
4551
"$..book[?(@.isbn)]",

0 commit comments

Comments
 (0)