MCPcopy
hub / github.com/microsoft/qlib / test_2_dump_instruments

Method test_2_dump_instruments

tests/test_dump_data.py:65–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63 assert len(ori_calendars - res_calendars) == len(res_calendars - ori_calendars) == 0, "dump calendars failed"
64
65 def test_2_dump_instruments(self):
66 ori_ins = set(map(lambda x: x.name[:-4].upper(), SOURCE_DIR.glob("*.csv")))
67 res_ins = set(D.list_instruments(D.instruments("all"), as_list=True))
68 assert len(ori_ins - res_ins) == len(ori_ins - res_ins) == 0, "dump instruments failed"
69
70 def test_3_dump_features(self):
71 df = D.features(self.STOCK_NAMES, self.QLIB_FIELDS)

Callers

nothing calls this directly

Calls 2

list_instrumentsMethod · 0.45
instrumentsMethod · 0.45

Tested by

no test coverage detected