(self)
| 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) |
nothing calls this directly
no test coverage detected