updated tests for readme generations

This commit is contained in:
2026-02-28 20:07:14 +05:30
parent 219d6f9f87
commit 73b15cc3ab
4 changed files with 81 additions and 0 deletions

View File

@@ -17,6 +17,12 @@ def test_mkdocs_emits_all_modules(tmp_path: Path) -> None:
renderer = MkDocsRenderer()
renderer.generate_sources(project, tmp_path)
renderer.generate_readme(
project,
tmp_path,
module_is_source=True,
)
emitted = {
p.relative_to(tmp_path).as_posix()
for p in tmp_path.rglob("*.md")
@@ -39,3 +45,8 @@ def test_mkdocs_emits_all_modules(tmp_path: Path) -> None:
missing = expected - emitted
assert not missing, f"Missing markdown files for modules: {missing}"
readme = tmp_path.parent / "README.md"
assert readme.exists(), "README.md was not generated"
content = readme.read_text(encoding="utf-8")
assert project.name in content