All checks were successful
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 45s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 15s
Test Suite / k6 /health Baseline (push) Successful in 38s
Test Suite / playwright-tests (push) Successful in 1m23s
- Introduced `_steps_to_evaluate_payloads` to convert path steps into evaluation payloads for improved quality assessments. - Updated `_build_progression_compare_response` to include a new `proposed_eval` parameter, allowing for fair quality assessment comparisons. - Enhanced `ProgressionGraphEditor` to utilize the new pipeline quality assessment data. - Modified `ProgressionOptimizeCompareModal` to display detailed comparison results, including handling of trivial slot differences and optimization hints. - Bumped version to reflect the new features and improvements.
48 lines
1.5 KiB
Python
48 lines
1.5 KiB
Python
"""Tests Vergleichs-Diffs (triviale ID-Tausche ausfiltern)."""
|
|
from planning_exercise_path_builder import (
|
|
_build_progression_slot_diffs,
|
|
_filter_trivial_slot_diffs,
|
|
)
|
|
|
|
|
|
def test_filter_trivial_slot_diffs_same_title_different_id():
|
|
diffs = [
|
|
{
|
|
"roadmap_major_step_index": 1,
|
|
"baseline_exercise_id": 10,
|
|
"baseline_title": "Rhythmuswechsel in der Kumite-Beinarbeit",
|
|
"proposed_exercise_id": 99,
|
|
"proposed_title": "Rhythmuswechsel in der Kumite-Beinarbeit",
|
|
}
|
|
]
|
|
assert _filter_trivial_slot_diffs(diffs) == []
|
|
|
|
|
|
def test_filter_trivial_slot_diffs_keeps_real_title_change():
|
|
diffs = [
|
|
{
|
|
"roadmap_major_step_index": 1,
|
|
"baseline_exercise_id": 10,
|
|
"baseline_title": "Alt",
|
|
"proposed_exercise_id": 99,
|
|
"proposed_title": "Neu",
|
|
}
|
|
]
|
|
filtered = _filter_trivial_slot_diffs(diffs)
|
|
assert len(filtered) == 1
|
|
assert filtered[0]["proposed_title"] == "Neu"
|
|
|
|
|
|
def test_build_slot_diffs_then_filter():
|
|
baseline = [
|
|
{"roadmap_major_step_index": 0, "exercise_id": 1, "title": "A"},
|
|
{"roadmap_major_step_index": 1, "exercise_id": 10, "title": "Gleich"},
|
|
]
|
|
proposed = [
|
|
{"roadmap_major_step_index": 0, "exercise_id": 1, "title": "A"},
|
|
{"roadmap_major_step_index": 1, "exercise_id": 77, "title": "Gleich"},
|
|
]
|
|
raw = _build_progression_slot_diffs(baseline, proposed)
|
|
assert len(raw) == 1
|
|
assert _filter_trivial_slot_diffs(raw) == []
|