Allow roll add-ons while position-limit freeze is active.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-24 02:08:44 +08:00
parent 9d1986d771
commit 6ffae02d30
11 changed files with 91 additions and 70 deletions
+2 -1
View File
@@ -499,7 +499,8 @@ class AccountRiskLibTests(unittest.TestCase):
self.assertEqual(st["status_label"], "仓位上限冻结")
self.assertFalse(st["can_trade"])
self.assertIn("2/2", st["reason"])
self.assertIn("不含趋势回调", st["reason"])
self.assertIn("顺势加仓", st["reason"])
self.assertTrue(st.get("can_roll"))
self.assertEqual(st["max_active_positions"], 2)
def test_position_limit_normal_when_under_cap(self):