Squash-merge lib-standardisation: adopt repo standards across packaging, tooling, docs, and CI. - standardize pyproject.toml (canonical packaging, lint config, extras, GSDFC pydoclint) - add py.typed marker, modernize type hints and Google-style docstrings - nest generated docs under docs/lib and docs/mcp; add hand-written wiki - adopt standard Type A PyPI CI pipeline (tag==version guard + quality gate) - promote generated CHANGELOG.md; bump version to 0.0.7
21 lines
547 B
Python
21 lines
547 B
Python
from pathlib import Path
|
|
|
|
from docforge import MCPRenderer
|
|
from docforge.models import Module, Project
|
|
|
|
|
|
def test_mcp_idempotent(tmp_path: Path):
|
|
project = Project("testpkg")
|
|
project.add_module(Module("testpkg.mod"))
|
|
|
|
out_dir = tmp_path / "mcp"
|
|
renderer = MCPRenderer()
|
|
|
|
renderer.generate_sources(project, out_dir)
|
|
first = (out_dir / "modules" / "testpkg.mod.json").read_text()
|
|
|
|
renderer.generate_sources(project, out_dir)
|
|
second = (out_dir / "modules" / "testpkg.mod.json").read_text()
|
|
|
|
assert first == second
|