Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
annbgn committed Aug 4, 2021
1 parent 772170f commit 058b6b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_cssselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,9 @@ def xpath(css):
assert xpath("e:nth-child(2n+1 of S)") == "e[count(preceding-sibling::S) mod 2 = 0]"
assert xpath("e:nth-of-type(2n+1 of S)") == "e[count(preceding-sibling::S) mod 2 = 0]"
assert (
xpath("e:nth-child(2n+1 of li.important)")
== "e[count(preceding-sibling::li[@class and contains(concat(' ', normalize-space(@class), ' '), ' important ')]) mod 2 = 0]"
xpath("e:nth-child(2n+1 of li.important)") == "e[count(preceding-sibling::li[@class"
" and contains(concat(' ', normalize-space(@class), ' '), ' important ')])"
" mod 2 = 0]"
)

assert xpath("e:nth-child(1)") == ("e[count(preceding-sibling::*) = 0]")
Expand Down Expand Up @@ -475,6 +476,9 @@ def xpath(css):
assert xpath("e ~ f:nth-child(3)") == (
"e/following-sibling::f[count(preceding-sibling::*) = 2]"
)
assert xpath("e ~ f:nth-child(3 of S)") == (
"e/following-sibling::f[count(preceding-sibling::S) = 2]"
)
assert xpath("div#container p") == ("div[@id = 'container']/descendant-or-self::*/p")

# Invalid characters in XPath element names
Expand Down

0 comments on commit 058b6b5

Please sign in to comment.