Files
phronesis/test/test_harnesses.py
T
nvaldez 196df53a9b phronesis v0.2.0: the CLI app per SPEC.md - list, filter, install, update
- SPEC.md sectionized with stable ids (sectionize-markdown conventions)
- src/phronesis: cli, registry, harnesses (modular, vibe first), state,
  formatting, completions; argcomplete completion; exit codes per SPEC
- phronesis              -> version line + skill table (name, version, category,
  description wrapped below, daedalus-style)
- phronesis <category>   -> filtered table; close-match typos for skills+categories
- phronesis <skill> --install | --project  [--harness <name>] [-f]
  installs whole skill dir; prompt when present; EOF/default = skip; -f no prompt
- phronesis --update     -> refresh every state entry; warns unbundled; reinstalls missing
- state: <config>/phronesis/installed.json, unique by (name, harness, scope)
- skill/python-tdd bumped 1.2.0 with category: development
- test/ (56 tests, 92% cov) + autotest pytest check with 75% floor;
  all 7 autotest checks green

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-19 09:50:45 +01:00

27 lines
697 B
Python

"""Harness tests: lookup and the vibe locations (SPEC section 5)."""
import pathlib
import pytest
from phronesis import harnesses
def test_lookup_returns_the_vibe_harness():
assert harnesses.lookup("vibe").name == "vibe"
def test_lookup_unknown_names_the_available():
with pytest.raises(harnesses.HarnessError, match="vibe"):
harnesses.lookup("colossus")
def test_vibe_global_dir(tmp_path):
harness = harnesses.VibeHarness()
harness.home = tmp_path
assert harness.global_dir() == tmp_path / ".vibe" / "skills"
def test_vibe_project_dir(tmp_path):
harness = harnesses.VibeHarness()
assert harness.project_dir(tmp_path) == tmp_path / ".vibe" / "skills"