diff --git a/tests/test_tsdb.py b/tests/test_tsdb.py index 677e36a..41e7fd6 100644 --- a/tests/test_tsdb.py +++ b/tests/test_tsdb.py @@ -14,6 +14,8 @@ DATASETS_TO_TEST = [ "ucr_uea_Wine", + "physionet_2012", + "beijing_multisite_air_quality", ] @@ -40,7 +42,7 @@ def test_2_dataset_loading(self): def test_3_dataset_purging(self): cached_datasets = tsdb.list_cache() assert isinstance(cached_datasets, list) - tsdb.delete_cache("ucr_uea_Wine") # delete single + tsdb.delete_cache("physionet_2012") # delete single tsdb.delete_cache() # delete all def test_4_logging(self): diff --git a/tsdb/utils/downloading.py b/tsdb/utils/downloading.py index 40fc9bc..5e629e6 100644 --- a/tsdb/utils/downloading.py +++ b/tsdb/utils/downloading.py @@ -85,7 +85,7 @@ def _download_and_extract(url: str, saving_path: str) -> Optional[str]: return saving_path -def download_and_extract(dataset_name: str, dataset_saving_path: str) -> Optional[str]: +def download_and_extract(dataset_name: str, dataset_saving_path: str) -> None: """Wrapper of _download_and_extract. Parameters @@ -96,15 +96,11 @@ def download_and_extract(dataset_name: str, dataset_saving_path: str) -> Optiona dataset_saving_path : str, The local path for dataset saving. - Returns - ------- - saving_path if successful else None - """ logger.info("Start downloading...") os.makedirs(dataset_saving_path) if isinstance(DATABASE[dataset_name], list): for link in DATABASE[dataset_name]: - return _download_and_extract(link, dataset_saving_path) + _download_and_extract(link, dataset_saving_path) else: - return _download_and_extract(DATABASE[dataset_name], dataset_saving_path) + _download_and_extract(DATABASE[dataset_name], dataset_saving_path)