env 配置去掉期权/对冲模式与对冲计划区块,仅保留单独期权。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-09-30 23:38:03 +08:00
parent 2e09814fe5
commit 2352a5fbdf
4 changed files with 31 additions and 214 deletions
+15
View File
@@ -67,6 +67,21 @@ class RemoveHedgeSmokeTests(unittest.TestCase):
self.assertNotIn("hedge_target_map", src)
self.assertNotIn("hedge_plan_target", src)
def test_env_ui_no_hedge_mode_section(self):
from lib.env.env_ui_manifest import ui_sections_for_exchange
from lib.env.env_schema import select_options_for
titles = [s["title"] for s in ui_sections_for_exchange("okx")]
self.assertNotIn("期权/对冲模式", titles)
self.assertTrue(any("对冲" not in t for t in titles))
for t in titles:
self.assertNotIn("对冲", t)
labels = [f[1] for s in ui_sections_for_exchange("okx") for f in s["fields"]]
for lab in labels:
self.assertNotIn("对冲", lab)
mode_opts = [o["value"] for o in select_options_for("OKX_TRADE_MODE")]
self.assertEqual(mode_opts, ["options"])
if __name__ == "__main__":
unittest.main()