17 lines
581 B
Python
17 lines
581 B
Python
|
|
"""Tests Planungs-KI Phase E — Pfad-QA."""
|
||
|
|
from planning_exercise_path_builder import _pick_best_path_hit
|
||
|
|
|
||
|
|
|
||
|
|
def test_pick_best_path_hit_prefers_semantic_score():
|
||
|
|
hits = [
|
||
|
|
{"id": 1, "title": "Mawashi", "score": 0.9, "semantic_score": 0.1},
|
||
|
|
{"id": 2, "title": "Mae Geri", "score": 0.75, "semantic_score": 0.85},
|
||
|
|
]
|
||
|
|
chosen = _pick_best_path_hit(hits, set())
|
||
|
|
assert chosen["id"] == 2
|
||
|
|
|
||
|
|
|
||
|
|
def test_pick_best_path_hit_skips_used():
|
||
|
|
hits = [{"id": 1, "title": "A", "score": 0.5, "semantic_score": 0.5}]
|
||
|
|
assert _pick_best_path_hit(hits, {1}) is None
|