add zt_open_hands

This commit is contained in:
2026-09-14 19:11:58 +08:00
parent 9eac1d2e10
commit c8151f4a3f
26 changed files with 126 additions and 550 deletions

View File

@@ -23,17 +23,6 @@ class StateStorageTests(unittest.TestCase):
trade_date='20260912', trade_time='100000',
)
def test_stale_cache_duplicate_preserves_original_and_imports_new_trade(self):
writer = State(self.store.path)
first = self.deal()
writer.sync_deals([first])
first.price = 20
first.trade_amount = 2000
self.store.sync_deals([first, self.deal('second')])
self.assertEqual(self.store.deals['first']['price'], 10)
self.assertEqual(self.store.deals_sys_ids, {'first', 'second'})
self.assertEqual(State(self.store.path).deals, self.store.deals)
def test_load_failure_does_not_publish_partial_cache(self):
writer = State(self.store.path)
writer.sync_state([PositionItem(stock_code='600000.SH', volume=100)])