File size: 983 Bytes
63c75d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
"""Standalone smoke test for skill coverage alias/path behavior."""
import os
import sys
import tempfile
from pathlib import Path

sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))

from reviewer import skill_analyzer


def main() -> int:
    assert "google-workspace" in skill_analyzer._skill_aliases("google_workspace")
    assert "arxiv" in skill_analyzer._skill_aliases("arxiv-mcp")
    with tempfile.TemporaryDirectory() as td:
        root = Path(td)
        (root / "google-workspace").mkdir()
        (root / "google-workspace" / "SKILL.md").write_text("---\nname: google-workspace\n---\n")
        old = skill_analyzer.SKILLS_DIR
        try:
            skill_analyzer.SKILLS_DIR = root
            assert skill_analyzer._list_mcp_skills() == ["google-workspace"]
        finally:
            skill_analyzer.SKILLS_DIR = old
    print("skill_analyzer_smoke: ok")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())