Add self-host guard: template must reproduce repo config

This commit is contained in:
jay
2026-11-09 14:23:41 -05:00
parent ed253e6da0
commit 1e4ffa5971
+15
View File
@@ -0,0 +1,15 @@
"""Self-host test: rendering this repo's name reproduces its own config."""
from new_python.render import TEMPLATE_DIR, render
REPO_ROOT = TEMPLATE_DIR.parent
def test_rendering_new_python_reproduces_the_repos_own_config():
"""The template must be this repo's own state, not a drifting copy."""
files = render("new-python")
for rel, content in files.items():
own = REPO_ROOT / rel
assert own.is_file(), f"repo lacks its own {rel}"
assert content == own.read_text(), f"{rel} drifted from the template"