diff --git a/scripts/test_batch20_units.py b/scripts/test_batch20_units.py index 9cc561c..544d1f0 100644 --- a/scripts/test_batch20_units.py +++ b/scripts/test_batch20_units.py @@ -526,7 +526,17 @@ def _(): seg = html[i:i + 800] assert "h.plan_rank" in seg, "提议卡的候选榜名次要读 plan_rank (硬数字里从来没有 rank 这个键)" assert "function propReasons(" in html and "propReasons," in html, "理由函数要定义并注册到模板" - assert "判为「{{ (p.hard_numbers||{}).verdict }}」" in html, "提议卡要显示选股系统的判决" + # 2026-09-04 改:提议卡不再印判决词本身。三个判决词是跨系统的数据、按字面比对, + # 但它们不告诉人能不能买,所以句子主干换成原因,判决词只用来分支。 + assert "判为「{{ (p.hard_numbers||{}).verdict }}」" not in html, \ + "提议卡不该再印判决词,要说原因" + assert "propVerdictLine(p)" in html, "提议卡要用 propVerdictLine 把判决说成原因" + k = html.index("const propVerdictLine") + vseg = html[k:k + 900] + for v in ("候选", "关注", "仅展示"): + assert f"'{v}'" in vseg, f"判决 {v} 要有对应的说法" + assert "h.missing" in vseg or "missing" in vseg, \ + "「关注」要说清缺什么 —— missing 一路带到前端却从没被渲染过" j = html.index("async function decide(") dseg = html[j:html.index("async function loadStrategies(")] assert "ElMessageBox.prompt" in dseg and "inputValidator" in dseg, "采纳与驳回都要弹必填理由"