From 66e82909a063c13ba1afce40c737f6a381e3afe7 Mon Sep 17 00:00:00 2001 From: zlt Date: Fri, 4 Sep 2026 14:45:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E8=AE=AE=E5=8D=A1=E7=9A=84=E6=96=AD?= =?UTF-8?q?=E8=A8=80=E8=B7=9F=E4=B8=8A=EF=BC=9A=E4=B8=8D=E5=8D=B0=E5=88=A4?= =?UTF-8?q?=E5=86=B3=E8=AF=8D=E3=80=81=E6=94=B9=E8=AF=B4=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E9=92=89=E4=BD=8F=E7=BC=BA=E5=A4=B1=E9=A1=B9?= =?UTF-8?q?=E8=A6=81=E8=A2=AB=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 --- scripts/test_batch20_units.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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, "采纳与驳回都要弹必填理由"