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
30 lines
750 B
Python
30 lines
750 B
Python
from pathlib import Path
|
|
|
|
from docforge.cli.main import cli
|
|
|
|
|
|
def test_mcp_build(cli_runner):
|
|
with cli_runner.isolated_filesystem():
|
|
cwd = Path.cwd()
|
|
pkg = cwd / "testpkg"
|
|
pkg.mkdir()
|
|
(pkg / "__init__.py").write_text("")
|
|
(pkg / "mod.py").write_text("def f(): ...\n")
|
|
|
|
out_dir = cwd / "docs" / "mcp"
|
|
|
|
result = cli_runner.invoke(
|
|
cli,
|
|
[
|
|
"build",
|
|
"--mcp",
|
|
"--module",
|
|
"testpkg",
|
|
],
|
|
)
|
|
|
|
assert result.exit_code == 0
|
|
assert (out_dir / "index.json").exists()
|
|
assert (out_dir / "nav.json").exists()
|
|
assert (out_dir / "modules" / "testpkg.mod.json").exists()
|