29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
import pytest
|
|
|
|
from app.harness.split_selection import cell_of, evolution_target_of, score_signal
|
|
|
|
|
|
def test_evolution_target_mapping():
|
|
assert evolution_target_of("extraction_failure") == "tool"
|
|
assert evolution_target_of("search_failure") == "skill"
|
|
assert evolution_target_of("reasoning_failure") == "skill"
|
|
assert evolution_target_of("mixed") == "system"
|
|
|
|
|
|
def test_evolution_target_unknown_raises():
|
|
with pytest.raises(ValueError):
|
|
evolution_target_of("unknown_type")
|
|
|
|
|
|
def test_cell_is_task_type_x_error_type():
|
|
assert cell_of("Counting Problem", "search_failure") == ("Counting Problem", "search_failure")
|
|
|
|
|
|
def test_tiers():
|
|
assert score_signal(cause_category="defect", infra=False, degraded=False).tier == "T2"
|
|
assert score_signal(cause_category="lapse", infra=False, degraded=False).tier == "T1"
|
|
assert (
|
|
score_signal(cause_category="defect", infra=True, degraded=False).tier == "T0"
|
|
) # INFRA 先判
|
|
assert score_signal(cause_category=None, infra=False, degraded=True).tier == "uncertain"
|