Files
skills/tests/test_optimize.py
T

31 lines
974 B
Python
Raw Normal View History

"""The self-improving skills must share the objective held by autotune."""
from __future__ import annotations
import unittest
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[1]
SKILLS = REPO_ROOT / "skills"
ROUTERS = ("autoskill", "confidence")
class TestOptimizeObjective(unittest.TestCase):
def test_autotune_names_the_three_axes(self):
text = (SKILLS / "autotune" / "SKILL.md").read_text(encoding="utf-8")
self.assertIn("## Objective", text)
for axis in ("**Tokens**", "**Time**", "**Quality**"):
self.assertIn(axis, text)
def test_routers_point_at_it(self):
for skill in ROUTERS:
text = (SKILLS / skill / "SKILL.md").read_text(encoding="utf-8")
2026-08-10 17:13:29 +02:00
self.assertIn(
"`autotune` skill's **Objective**",
text,
f"{skill} does not route to the autotune objective",
2026-08-10 17:13:29 +02:00
)
if __name__ == "__main__":
unittest.main()