Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions scripts/check_site_content.sh

This file was deleted.

21 changes: 21 additions & 0 deletions tests/test_site.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import re
from pathlib import Path

from brand.build import projects as p

_INDEX = Path(__file__).parent.parent / "docs" / "index.md"


Expand All @@ -12,3 +15,21 @@ def test_home_page_supplies_its_own_h1() -> None:
decoration — and the site quietly grows a "Modern Python" heading above it.
"""
assert "<h1" in _INDEX.read_text(encoding="utf-8")


def test_every_listed_project_mark_has_a_site_entry() -> None:
"""INVARIANT: the repos in the org site's project lists are exactly the repos in
`projects.py::MANIFEST` minus the `modern-di-*` integrations.

It is the site's half of the profile-row invariant. A hand-kept list of expected
repos drifts the same way the page does, so a repo added to the org and the profile
can still be missing here without anything failing.
"""
listed = set(
re.findall(
r"^- \[`([^`]+)`\]\(https://github\.com/modern-python/\1\)",
_INDEX.read_text(encoding="utf-8"),
flags=re.M,
)
)
assert listed == {repo for repo in p.MANIFEST if not repo.startswith("modern-di-")}
Loading