chore: apply ruff format to dead-path guard test

This commit is contained in:
2026-07-15 10:07:19 -04:00
parent 13234426b5
commit a536a81b0d
+2 -6
View File
@@ -27,12 +27,8 @@ def test_no_parallel_perquestion_split_helpers():
# 旧逐题分桶残留:正确率不应按 qid 直接取
assert "correctness.get(qid)" not in src, "batching 仍有逐题分桶残留"
# gate 块残留探测:validate.py 是逐题 gate 核心残留点,基线缓存键须含 unit_id
assert "baseline_cache.get(" not in src or "unit_id" in src, (
"validate baseline_cache 仍按 qid"
)
assert "baseline_cache.get(" not in src or "unit_id" in src, "validate baseline_cache 仍按 qid"
# 逐题累加残留:n_used 不应按逐题 chunk 长度累加(应按 unit)
assert "n_used += len(chunk)" not in src, "validate n_used 仍逐题累加(应按 unit"
# 正向 unit 化探测:pools/batching/validate/inference 已走 unit 契约
assert src.count("build_units") >= 1 or "unit_id" in src, (
"pools/batching/validate 未走 unit 化"
)
assert src.count("build_units") >= 1 or "unit_id" in src, "pools/batching/validate 未走 unit 化"