Migrate from FastMCP 2.14.5 to 3.1.0 with complete architectural overhaul. Adopt src-layout packaging, lazy config functions to eliminate .env race condition, and decorator-based tool registration. Consolidate 14 tool modules into 8 focused modules (33 tools total). Add 9 new schematic tools via kicad-sch-api for creating and manipulating .kicad_sch files. Drop pandas dependency (BOM uses stdlib csv). Remove ~17k lines of stubs, over-engineering, and dead code. All checks pass: ruff clean, mypy 0 errors, 17/17 tests green.
21 lines
656 B
Python
21 lines
656 B
Python
"""Tests for project tools."""
|
|
|
|
|
|
|
|
def test_get_project_structure(project_path):
|
|
"""get_project_structure should return file dict for a valid project."""
|
|
from mckicad.tools.project import get_project_structure
|
|
|
|
result = get_project_structure(project_path)
|
|
assert result["success"] is True
|
|
assert "project" in result["data"]["files"]
|
|
|
|
|
|
def test_get_project_structure_missing():
|
|
"""get_project_structure should fail for nonexistent path."""
|
|
from mckicad.tools.project import get_project_structure
|
|
|
|
result = get_project_structure("/nonexistent/fake.kicad_pro")
|
|
assert result["success"] is False
|
|
assert "error" in result
|