diff --git a/scripts/test_batch24_units.py b/scripts/test_batch24_units.py index 02218d0..a6c722c 100644 --- a/scripts/test_batch24_units.py +++ b/scripts/test_batch24_units.py @@ -144,7 +144,9 @@ def test_parse_sources(): unknown = [r for r in arows if not r["stale"]][0] assert unknown["cat"] == "other" and unknown["direction"] == "看跌", unknown - sell = [("1-0", {"data": '{"ts_code": "601126.SH", "action": "SELL", "confidence": 0.8,' + # 不分键的流要用真实毫秒当流 id (Redis 自动生成的 id 毫秒就是写入时刻), + # 否则会被"扫到今天零点为止"直接截掉 —— 这正是那道截断在起作用。 + sell = [("%d-0" % _today_ms(14, 10), {"data": '{"ts_code": "601126.SH", "action": "SELL", "confidence": 0.8,' ' "dominant_signal": "BREAK_DOWN", "llm_reason": "跌破支撑",' ' "timestamp": %d}' % _today_ms(14, 10)})] srows, _n, _t = us._bycode_sell(_FakeRedis({"bionic:signals:llm_sell_actions": sell}), "601126.SH", 5000)