27 lines
1.3 KiB
Python
27 lines
1.3 KiB
Python
import pathlib
|
|
import sys
|
|
import typing
|
|
import unittest
|
|
|
|
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
|
|
|
|
from review_passes import PASS_AGENTS, PASSES, prose, ReviewedPass, REVIEWERS
|
|
|
|
|
|
class ReviewPasses(unittest.TestCase):
|
|
def test_names_each_pass_that_has_an_agent_once_in_the_literal_and_in_the_list(self):
|
|
self.assertEqual(list(REVIEWERS), list(typing.get_args(ReviewedPass)))
|
|
self.assertEqual(list(REVIEWERS), [name for name in PASSES if PASS_AGENTS[name]])
|
|
|
|
def test_names_each_agent_under_agents(self):
|
|
agents = pathlib.Path(__file__).resolve().parents[1] / "agents"
|
|
self.assertEqual(sorted(REVIEWERS.values()), sorted(path.stem for path in agents.glob("*.md")))
|
|
|
|
def test_counts_markdown_an_agent_follows_as_config_and_the_rest_as_prose(self):
|
|
for path in ("README.md", "docs/decisions.md", "todo.md", "workflow-bench/README.md"):
|
|
with self.subTest(path=path):
|
|
self.assertTrue(prose(path))
|
|
for path in ("CLAUDE.md", "AGENTS.md", "skills/larv-review/SKILL.md", "agents/prose-reviewer.md", "rules/todo-items.md", "principles/technical-principles.md", "workflow-bench/run-prompt.md", "workflow-bench/compare-prompt.md", ".claude/agents/reviewer.md", ".claude/skills/x/SKILL.md", "bin/rank_todo.py"):
|
|
with self.subTest(path=path):
|
|
self.assertFalse(prose(path))
|