Files
doc-forge/tests/cli/test_build_mcp.py
Vishesh 'ironeagle' Bangotra 06ffd2febd chore(release): 0.0.7
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
2026-10-17 02:16:44 +05:30

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()