24 lines
646 B
Python
24 lines
646 B
Python
from pathlib import Path
|
|
|
|
from docforge import MCPRenderer
|
|
from docforge.models import Module, Project
|
|
|
|
|
|
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)
|
|
|
|
# Bundle-level files
|
|
assert (out_dir / "index.json").exists()
|
|
assert (out_dir / "nav.json").exists()
|
|
|
|
# Module resources
|
|
assert (out_dir / "modules" / "testpkg.json").exists()
|
|
assert (out_dir / "modules" / "testpkg.sub.json").exists()
|