fix: ship the real DTD in the Pelican plugin

This commit is contained in:
randogoth 2026-10-11 20:55:07 +03:00
parent f54d350216
commit 884300f3cf
8 changed files with 483 additions and 74 deletions

View file

@ -24,6 +24,18 @@ def test_the_projects_own_pages_have_no_warnings_either(page):
assert not report.warnings, "\n".join(str(f) for f in report.warnings)
PLUGIN_PAGES = sorted(
(ROOT / "pelican-mews" / "tests" / "fixtures").glob("*/expected.xhtml")
)
@pytest.mark.parametrize("page", PLUGIN_PAGES, ids=lambda p: p.parent.name)
def test_pages_the_pelican_plugin_produces_conform(page):
"""What the plugin writes has to pass the validator, or it is no use."""
report = validate_file(str(page))
assert report.conforms, "\n".join(str(f) for f in report.failures)
def test_the_dtd_still_matches_the_spec():
"""dtd/check_dtd.py is hand-maintained; keep it running in CI."""
result = subprocess.run(