Skip to content

Commit

Permalink
Add new test
Browse files Browse the repository at this point in the history
  • Loading branch information
rushter committed Mar 10, 2024
1 parent c4c9cc0 commit 410bf33
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,3 +559,11 @@ def test_merge_text_nodes(parser):
assert node.html == "<div><p>John</p><p>Doe</p></div>"
text = tree.text(deep=True, separator=" ", strip=True)
assert text == "John Doe"


@pytest.mark.parametrize(*_PARSERS_PARAMETRIZER)
def test_css_first_first(parser):
html = '<h2 class="list-details__item__partial" id="js-partial">(1:1, 0:0, 0:0, 5:3)</h2>'
selector = "h2.list-details__item__partial"
find_first = parser(html).css_first(selector)
assert find_first.css_first(selector) is not None

0 comments on commit 410bf33

Please sign in to comment.