@urlpatch(_mock_asas_training_url)
def test_fetch_asas_training(self):
    num_files = 1
    data_dir = tempfile.mkdtemp()
    asas_training.MD5SUMS = None
    data = asas_training.fetch_asas_training(data_dir)
    assert(data['archive'].endswith('asas_training_set.tar.gz')
           and os.path.exists(data['archive']))
    header = pd.read_csv(data['header'])
    npt.assert_array_equal(header['class'], data['classes'])
    assert(all(len(t) == len(m) and len(m) == len(e)
               for t, m, e in zip(data['times'], data['measurements'],
                                  data['errors'])))
    assert(len(data['times']) == num_files)
    assert(len(data['classes']) == num_files)
    assert(len(data['metadata']) == num_files)
    assert(all(c in ['a'] for c in data['classes']))
    shutil.rmtree(data_dir)
Test ASAS training data download.
dataset/ETHPy150Open cesium-ml/cesium/cesium/datasets/tests/test_datasets.py/test_fetch_asas_training