brain backup 2026-09-14

This commit is contained in:
Adolfo Reyna
2026-09-14 22:38:47 -04:00
parent ca346cc6e7
commit f0ead4f6fa
147 changed files with 73451 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
import importlib.util
from pathlib import Path
ROOT = Path(__file__).resolve().parent
spec = importlib.util.spec_from_file_location("render_parent_book", ROOT / "render_parent_book.py")
render_parent_book = importlib.util.module_from_spec(spec)
assert spec.loader
spec.loader.exec_module(render_parent_book)
def test_parent_review_contract_preserves_chapter_anchors_and_rejects_internal_subtitles():
valid = "## Chapter 0: A Beginning\n\nText\n\n## Chapter 1: The Pattern\n\nText\n\n### Reflection and Action\n\nWork"
render_parent_book.validate_parent_review_contract(valid)
def test_parent_review_contract_rejects_missing_chapter_anchor():
import pytest
with pytest.raises(ValueError, match="Chapter 1"):
render_parent_book.validate_parent_review_contract("## Chapter 0: A Beginning\n")