Files
OpenJarvis/tests/learning/test_heuristic_policy.py
T
Jon Saad-FalconandClaude Opus 4.6 323d7ff032 Add TOML config system for eval suites, pillar-aligned config, and documentation
- Eval config: TOML-based suite configs defining models x benchmarks matrix,
  loaded via --config flag. Includes load_eval_config(), expand_suite(),
  7 config dataclasses, 3 example configs, and 61 new tests.
- Pillar-aligned config: generation params in IntelligenceConfig, nested
  engine/learning configs, agent objective/system_prompt/context_from_memory,
  structured learning sub-policies, TOML migration layer.
- Documentation: evaluations user guide, evals API reference, updated
  mkdocs.yml navigation, updated architecture docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:34:05 +00:00

24 lines
816 B
Python

"""Tests for heuristic policy registration."""
from __future__ import annotations
from openjarvis.core.registry import RouterPolicyRegistry
from openjarvis.learning.heuristic_policy import ensure_registered
from openjarvis.learning.router import HeuristicRouter
class TestHeuristicPolicy:
def test_registered_as_heuristic(self) -> None:
ensure_registered()
assert RouterPolicyRegistry.contains("heuristic")
def test_value_is_heuristic_router(self) -> None:
ensure_registered()
assert RouterPolicyRegistry.get("heuristic") is HeuristicRouter
def test_can_instantiate(self) -> None:
ensure_registered()
cls = RouterPolicyRegistry.get("heuristic")
router = cls(available_models=["model-a"])
assert router.available_models == ["model-a"]