added mcp_renderer

This commit is contained in:
2026-01-21 16:18:25 +05:30
parent 9a5e356039
commit 427e407d26
17 changed files with 212 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
from pathlib import Path
from docforge import MCPRenderer
from docforge.models import Project, Module
def test_mcp_directory_structure(tmp_path: Path):
project = Project("testpkg")
project.add_module(Module("testpkg"))
project.add_module(Module("testpkg.sub"))
out_dir = tmp_path / "mcp"
renderer = MCPRenderer()
renderer.generate_sources(project, out_dir)
assert (out_dir / "testpkg.md").exists()
assert (out_dir / "testpkg" / "sub.md").exists()