diff --git a/tests/test_selfhost.py b/tests/test_selfhost.py new file mode 100644 index 0000000..5f3fb02 --- /dev/null +++ b/tests/test_selfhost.py @@ -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"