Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_cssselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ def xpath(css: str) -> str:
"concat(' ', normalize-space(@class), ' '), ' foo ')) and (descendant::f)]"
)
# Combinators inside a :has() argument
assert xpath("e:has(f g)") == "e[descendant::f/descendant-or-self::*/g]"
assert xpath("e:has(f g)") == "e[descendant::f/descendant::g]"
assert xpath("e:has(> f > g)") == "e[./f/g]"
assert xpath("e:has(~ f + g)") == (
"e[following-sibling::f/following-sibling::*"
Expand All @@ -833,7 +833,7 @@ def xpath(css: str) -> str:
# A leading "+" applies to the first step of the argument, so that any
# further step is walked from the adjacent sibling.
assert xpath("e:has(+ f g)") == (
"e[following-sibling::*[1]/self::f/descendant-or-self::*/g]"
"e[following-sibling::*[1]/self::f/descendant::g]"
)
# A relative selector list matches if any of its arguments does
assert xpath("e:has(f, > g)") == "e[(descendant::f) or (./g)]"
Expand Down
Loading