Skip to content

Commit

Permalink
test: Rewrite html link func tests as property based
Browse files Browse the repository at this point in the history
  • Loading branch information
abelcheung committed Dec 4, 2024
1 parent c1fe84a commit bde5482
Show file tree
Hide file tree
Showing 3 changed files with 431 additions and 256 deletions.
3 changes: 3 additions & 0 deletions tests/runtime/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def html2_tree(html2_filepath: Path) -> _e._ElementTree[_h.HtmlElement]:
tree = _h.parse(f)
return tree

@pytest.fixture
def html2_root(html2_tree: _e._ElementTree[_h.HtmlElement]) -> _h.HtmlElement:
return html2_tree.getroot()

@pytest.fixture
def svg_tree(svg_filepath: Path) -> _e._ElementTree:
Expand Down
4 changes: 3 additions & 1 deletion tests/runtime/html/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def disposable_html_with_base_href() -> HtmlElement:
b.BASE(href="?foo?<")
),
b.BODY(
b.A("Link text", href="#id1", id="id1"),
b.A("Anchor", href="#id1", id="id1"),
b.A("Relative Link", href="./relative"),
b.A("Full Link", href="http://example.org"),
)
)
Loading

0 comments on commit bde5482

Please sign in to comment.