updated tests for readme generations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user