单测钉住 rule_gate.BAD_Y_SIGNALS 与另外两处同集合

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
zlt 2026-09-08 13:31:05 +08:00
parent 0fa4a5a2ff
commit ac78693987
1 changed files with 10 additions and 0 deletions

View File

@ -530,6 +530,16 @@ def _():
# ================================================================ 入口
# ---------- 坏信号集合钉死2026-09-07 方案第五件,一致性检查表第十行) ----------
@case("rule_gate.BAD_Y_SIGNALS 与选股系统 pool.BAD_SIGNALS、择时决策系统 pms_advisor.BAD_Y_SIGNALS 同集合")
def test_bad_y_signals_pinned():
# 三处必须逐字相同选股系统拿它移出候选池、PMS 拿它拦买入、择时决策系统拿它在应答里拦买入。
# 任何一处改取值,三处的测试都会红,逼着一起改。这里钉 PMS 这一处。
from app.core import rule_gate
assert set(rule_gate.BAD_Y_SIGNALS) == {"SELL", "AVOID", "DROPPED"}, sorted(rule_gate.BAD_Y_SIGNALS)
assert isinstance(rule_gate.BAD_Y_SIGNALS, tuple)
def main():
ok = 0
for name, fn in RESULTS: