MCPcopy Index your code
hub / github.com/MiniMax-AI/Mini-Agent / test_get_skill

Function test_get_skill

tests/test_skill_loader.py:115–130  ·  view source on GitHub ↗

Test getting a loaded skill

()

Source from the content-addressed store, hash-verified

113
114
115def test_get_skill():
116 """Test getting a loaded skill"""
117 with tempfile.TemporaryDirectory() as tmpdir:
118 skill_dir = Path(tmpdir) / "test-skill"
119 skill_dir.mkdir()
120 create_test_skill(skill_dir, "test-skill", "Test", "Content")
121
122 loader = SkillLoader(tmpdir)
123 loader.discover_skills()
124
125 skill = loader.get_skill("test-skill")
126 assert skill is not None
127 assert skill.name == "test-skill"
128
129 # Test non-existent skill
130 assert loader.get_skill("nonexistent") is None
131
132
133

Callers

nothing calls this directly

Calls 4

discover_skillsMethod · 0.95
get_skillMethod · 0.95
SkillLoaderClass · 0.90
create_test_skillFunction · 0.70

Tested by

no test coverage detected