修复 Autocal 录像故障处理、复核回放与汇总统计
This commit is contained in:
@@ -164,3 +164,19 @@ def test_confirmed_and_candidate_windows_are_never_fitted_together():
|
||||
assert by_review["candidate"]["slope_raw_per_N"] == pytest.approx(40.0)
|
||||
assert by_review["confirmed"]["window_count"] == 2
|
||||
assert by_review["confirmed"]["slope_raw_per_N"] == pytest.approx(40.0)
|
||||
|
||||
|
||||
def test_site_aggregation_keeps_review_sets_and_trial_counts_separate():
|
||||
from orisys_autocal.summary import aggregate_sensitivity, build_sensitivity
|
||||
|
||||
windows = [
|
||||
_window(0, 0, branch="baseline"), _window(5, 500),
|
||||
_window(10, 400, verified=True), _window(15, 600, verified=True),
|
||||
]
|
||||
rows = [row for row in aggregate_sensitivity(build_sensitivity(windows))
|
||||
if row["component"] == "FN"]
|
||||
assert len(rows) == 2
|
||||
by_review = {row["review_status"]: row for row in rows}
|
||||
assert by_review["candidate"]["slope_mean_raw_per_N"] == pytest.approx(100)
|
||||
assert by_review["confirmed"]["slope_mean_raw_per_N"] == pytest.approx(40)
|
||||
assert all(row["trials"] == 1 and row["slope_std_raw_per_N"] is None for row in rows)
|
||||
|
||||
Reference in New Issue
Block a user