| | |
| | | l2_transaction_data_processor.HuaXinTransactionDatasProcessor().process_huaxin_transaction_datas(code, d) |
| | | |
| | | def test_cancel(self): |
| | | code = "603300" |
| | | code = "002383" |
| | | l2.l2_data_util.load_l2_data(code) |
| | | TradeBuyQueue.get_traded_index = mock.Mock(return_value=(3742, False)) |
| | | l2.cancel_buy_strategy.RDCancelBigNumComputer._RDCancelBigNumComputer__watch_indexes_cache ={ code: {3686, 3691, 3693, 3694, 3699, 3700}} |
| | | l2.cancel_buy_strategy.RDCancelBigNumComputer().need_cancel(code, 4370, 4372) |
| | | TradeBuyQueue.get_traded_index = mock.Mock(return_value=(21836, False)) |
| | | l2.cancel_buy_strategy.RDCancelBigNumComputer._RDCancelBigNumComputer__watch_indexes_cache = { |
| | | code: {21851, 21844, 21854}} |
| | | l2.cancel_buy_strategy.RDCancelBigNumComputer().need_cancel(code, 22197, 22217) |
| | | |
| | | |
| | | class TestTradedProgress(unittest.TestCase): |
| | | @unittest.skip("跳过此单元测试") |
| | | def test_get_progress(self): |
| | | code = "000925" |
| | | code = "002383" |
| | | l2.l2_data_util.load_l2_data(code) |
| | | # l2.l2_data_util.local_today_datas[code] = l2.l2_data_util.local_today_datas[code][:898] |
| | | |
| | | TradeBuyQueue.get_traded_index = mock.Mock(return_value=(10, False)) |
| | | TradeBuyQueue.get_traded_index = mock.Mock(return_value=(21836, False)) |
| | | buy_progress_index = TradeBuyQueue().compute_traded_index(code, "9.76", |
| | | [9999, 1506], "09:32:45") |
| | | print("获取到交易进度:", buy_progress_index) |