Restore hold_timing open-position unit test.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-27 15:42:10 +08:00
parent 3d7c453bd1
commit 70a294c948
+8
View File
@@ -55,6 +55,14 @@ def test_hold_dual_leg_uses_group_close():
assert h["hold_basis"] == "group"
def test_hold_open_no_close():
g = {"open_at_ms": 100, "close_at_ms": None, "status": "open", "close_reason": None}
h = hold_timing(g, [])
assert h["hold_close_at_ms"] is None
assert h["hold_ms"] is None
assert h["hold_basis"] == "open"
def test_hold_sqlite_row_like_without_get():
"""sqlite3.Row 无 .get,需能转 dict。"""