From 2304b866678dc785f3aa7f3dd145f1fc8e95c62f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 14 Sep 2026 14:06:06 +0800 Subject: [PATCH] =?UTF-8?q?test(feasibility):=20=E4=BF=AEA4=E6=96=AD?= =?UTF-8?q?=E8=A8=80=E6=9C=9F=E6=9C=9B=E5=80=BC=E2=80=94=E2=80=94EI=20det?= =?UTF-8?q?=3D6/ftr=3D1=E4=BD=8E=E5=A4=8D=E6=9D=82=E5=BA=A6=E5=BA=943FP?= =?UTF-8?q?=E9=9D=9E7,=E9=9D=9E=E6=B3=95type=E6=AD=A3=E7=A1=AE=E8=BF=9Bpen?= =?UTF-8?q?ding(=E4=BA=A7=E5=93=81=E8=A1=8C=E4=B8=BA=E5=AF=B9,=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E6=9C=9F=E6=9C=9B=E5=80=BC=E5=86=99=E9=94=99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/p3_feasibility_e2e.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/p3_feasibility_e2e.py b/scripts/p3_feasibility_e2e.py index bf74723..4eacdd2 100644 --- a/scripts/p3_feasibility_e2e.py +++ b/scripts/p3_feasibility_e2e.py @@ -103,8 +103,13 @@ async def m(): bad = await call("opp_fp_estimate", {"functions_json": json.dumps( [{"name": "x", "type": "XXX", "det": 5}, {"name": "y", "type": "EI", "det": 6, "ftr": 1}])}) db_ = json.loads(bad) if bad.startswith("{") else {} - check("A4 非法type进pending不炸", db_.get("总FP") == 7 and len(db_.get("待确认") or []) == 1, - bad[:150]) + # EI det=6(档5-15) ftr=1(档0-1) → 低复杂度 → 3 FP(独立复算核对) + ref_bad = fp_ref.calc({"project": "", "functions": [ + {"name": "y", "type": "EI", "det": 6, "ftr": 1}]}) + check("A4 非法type进pending不炸", db_.get("总FP") == ref_bad["total_fp"] == 3 + and len(db_.get("待确认") or []) == 1, + "fp=%s ref=%s pending=%d" % (db_.get("总FP"), ref_bad["total_fp"], + len(db_.get("待确认") or []))) e1 = await call("opp_fp_estimate", {"functions_json": "[]"}) check("A5 空数组拒绝", e1.startswith("ERROR:"), e1[:80])