Files
hqt/tests/test_skills.py
T
felixm 90944948f5 Initial commit: hqt — HQ Terminal TUI
TUI for orchestrating AI coding harness sessions (Claude Code, Codex,
Kiro, etc.) via tmux. Click CLI bootstraps a Textual TUI over
ProjectService/SessionService backed by SQLite, spawning harness
sessions as tmux windows through TmuxManager.

Includes recent fixes:
- Visible Tab focus highlight on dialog OK/Cancel buttons
- Auto-select first project on launch
- Auto-select first session + per-project session-selection memory
- tmux new-window targets an explicit free index, fixing
  "index N in use" failures (broken spawn/attach in attached sessions)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 17:06:57 -04:00

28 lines
798 B
Python

from pathlib import Path
from hqt.skills.registry import SkillRegistry
def test_discover_skills(tmp_path: Path):
skill_dir = tmp_path / "my-skill"
skill_dir.mkdir()
(skill_dir / "SKILL.md").write_text("---\nname: my-skill\ndescription: A test skill\n---\nSkill content here")
registry = SkillRegistry(tmp_path)
skills = registry.discover()
assert len(skills) == 1
assert skills[0].name == "my-skill"
assert skills[0].description == "A test skill"
assert skills[0].content == "Skill content here"
def test_discover_empty_dir(tmp_path: Path):
registry = SkillRegistry(tmp_path)
assert registry.discover() == []
def test_discover_nonexistent_dir(tmp_path: Path):
registry = SkillRegistry(tmp_path / "nope")
assert registry.discover() == []