Skip to content

Commit 43a6a60

Browse files
authored
update tests workflow (#865)
1 parent a271efb commit 43a6a60

File tree

5 files changed

+12
-37
lines changed

5 files changed

+12
-37
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies = [
88
"pyyaml",
99
]
1010

11-
[project.optional-dependencies]
11+
[dependency-groups]
1212
dev = [
1313
"pre-commit",
1414
"typer",

tests/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"",
55
"blog",
66
"about.html",
7-
"bpd-events",
87
"support.html",
98
]
109

tests/test.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ def __init__(self):
1313
super().__init__()
1414
self.title = ""
1515
self._in_title = False
16-
self.lang = None
1716
self.meta_description = None
1817
self.links = []
1918
self.classes = []
2019

2120
def handle_starttag(self, tag, attrs):
2221
attrs_dict = dict(attrs)
23-
if tag == "html":
24-
self.lang = attrs_dict.get("lang")
25-
elif tag == "title":
22+
if tag == "title":
2623
self._in_title = True
2724
elif tag == "meta" and attrs_dict.get("name") == "description":
2825
self.meta_description = attrs_dict.get("content", "")
@@ -72,7 +69,6 @@ def built_site():
7269
"": "index.html",
7370
"blog": "blog/index.html",
7471
"about.html": "about.html",
75-
"bpd-events": "bpd-events/page.html",
7672
"support.html": "support.html",
7773
}
7874

@@ -84,26 +80,6 @@ def test_destination(loaded_route: str, built_site: pathlib.Path) -> None:
8480
assert output_file.exists(), f"Expected output file not found: {output_file}"
8581

8682

87-
LANG_ROUTES = {
88-
"/": "index.html",
89-
"/about.html": "about.html",
90-
"/bpd-events/": "bpd-events/page.html",
91-
"/support.html": "support.html",
92-
"/blog/": "blog/index.html",
93-
}
94-
95-
96-
@pytest.mark.parametrize("route, file_path", list(LANG_ROUTES.items()))
97-
def test_headers_in_language(
98-
built_site: pathlib.Path, route: str, file_path: str
99-
) -> None:
100-
"""Check that each page has lang='en' on the html element."""
101-
parsed = parse_html(built_site / file_path)
102-
assert (
103-
parsed.lang == "en"
104-
), f"Expected lang='en' on {route}, got lang='{parsed.lang}'"
105-
106-
10783
@pytest.mark.parametrize(
10884
"title, file_path",
10985
(

uv.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)