Skip to content

Commit 058b6b5

Browse files
author
annbgn
committed
fix lint
1 parent 772170f commit 058b6b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_cssselect.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,9 @@ def xpath(css):
406406
assert xpath("e:nth-child(2n+1 of S)") == "e[count(preceding-sibling::S) mod 2 = 0]"
407407
assert xpath("e:nth-of-type(2n+1 of S)") == "e[count(preceding-sibling::S) mod 2 = 0]"
408408
assert (
409-
xpath("e:nth-child(2n+1 of li.important)")
410-
== "e[count(preceding-sibling::li[@class and contains(concat(' ', normalize-space(@class), ' '), ' important ')]) mod 2 = 0]"
409+
xpath("e:nth-child(2n+1 of li.important)") == "e[count(preceding-sibling::li[@class"
410+
" and contains(concat(' ', normalize-space(@class), ' '), ' important ')])"
411+
" mod 2 = 0]"
411412
)
412413

413414
assert xpath("e:nth-child(1)") == ("e[count(preceding-sibling::*) = 0]")
@@ -475,6 +476,9 @@ def xpath(css):
475476
assert xpath("e ~ f:nth-child(3)") == (
476477
"e/following-sibling::f[count(preceding-sibling::*) = 2]"
477478
)
479+
assert xpath("e ~ f:nth-child(3 of S)") == (
480+
"e/following-sibling::f[count(preceding-sibling::S) = 2]"
481+
)
478482
assert xpath("div#container p") == ("div[@id = 'container']/descendant-or-self::*/p")
479483

480484
# Invalid characters in XPath element names

0 commit comments

Comments
 (0)