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

Method test_0_qlib_data

tests/test_get_data.py:35–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33 shutil.rmtree(str(DATA_DIR.resolve()))
34
35 def test_0_qlib_data(self):
36 GetData().qlib_data(
37 name="qlib_data_simple", target_dir=QLIB_DIR, region="cn", interval="1d", delete_old=False, exists_skip=True
38 )
39 df = D.features(D.instruments("csi300"), self.FIELDS)
40 self.assertListEqual(list(df.columns), self.FIELDS, "get qlib data failed")
41 self.assertFalse(df.dropna().empty, "get qlib data failed")
42
43 def test_1_csv_data(self):
44 GetData().download_data(file_name="csv_data_cn.zip", target_dir=SOURCE_DIR)

Callers

nothing calls this directly

Calls 4

GetDataClass · 0.90
qlib_dataMethod · 0.80
featuresMethod · 0.80
instrumentsMethod · 0.45

Tested by

no test coverage detected