diff --git a/scripts/test_batch24_units.py b/scripts/test_batch24_units.py index f70f0f5..02218d0 100644 --- a/scripts/test_batch24_units.py +++ b/scripts/test_batch24_units.py @@ -125,8 +125,10 @@ def test_parse_sources(): "trigger_time": _today_ms(10, 31)})] rows, n, _t = us._bycode_intraday(_FakeRedis({"intraday_signals:%s" % ymd: itd}), ymd, "601126.SH", 5000) assert n == 3 and len(rows) == 2, (n, len(rows)) - assert rows[0]["src"] == "decision" and rows[0]["time"] == "10:04" and rows[0]["confidence"] == 0.95 - assert rows[1]["src"] == "timing" and rows[1]["entry_score"] == 78.0, rows[1] + # 流是倒序读的, 所以 10:30 的择时层那条在前 + assert rows[0]["src"] == "timing" and rows[0]["entry_score"] == 78.0, rows[0] + assert rows[1]["src"] == "decision" and rows[1]["time"] == "10:04" and rows[1]["confidence"] == 0.95, rows[1] + assert rows[1]["cat_label"] == "建议买入" and rows[1]["price"] == 43.15 old = _today_ms(9, 35) with _Patch() as p: