Files
a-limasov-ii db5a43b19a refactor: make gitea a self-contained Cline skill
Relocate the script into the skill (skills/gitea/scripts/gitea_mcp.py) and add a
PEP 723 dependency block, so `uv run scripts/gitea_mcp.py` provisions deps with no
install step and the skill folder is portable (drop into ~/.cline/skills/). Drop
the non-standard `metadata` frontmatter — Cline only recognizes name + description.

- .mcp.json points at the relocated script and runs with --no-project (PEP 723)
- SKILL.md uses relative scripts/ paths; metadata block removed
- find_config walks up the tree to locate config.json (skill root or plugin root)
- tests import gitea_mcp via pytest pythonpath; README/CLAUDE paths updated

Tests: 119 passed, 92% coverage. Standalone list-tools verified via uv --no-project.
2026-06-24 14:35:28 +03:00

28 lines
779 B
Python

import asyncio
from gitea_mcp import mcp
EXPECTED_TOOL_COUNT = 66
def test_all_tools_registered():
tools = asyncio.run(mcp.list_tools())
names = sorted(t.name for t in tools)
assert len(tools) == EXPECTED_TOOL_COUNT, (
f"Expected {EXPECTED_TOOL_COUNT} tools, found {len(tools)}.\n"
f"Tools: {names}"
)
def test_tool_names_unique():
tools = asyncio.run(mcp.list_tools())
names = [t.name for t in tools]
assert len(names) == len(set(names)), (
f"Duplicate tool names: {[n for n in names if names.count(n) > 1]}"
)
def test_all_tools_have_description():
tools = asyncio.run(mcp.list_tools())
missing = [t.name for t in tools if not t.description]
assert not missing, f"Tools without description: {missing}"