Esempio n. 1
0
def test_fetch_atlas_allen_2011():
    bunch = atlas.fetch_atlas_allen_2011(data_dir=tst.tmpdir, verbose=0)
    keys = ("maps",
            "rsn28",
            "comps")

    filenames = ["ALL_HC_unthresholded_tmaps.nii",
                 "RSN_HC_unthresholded_tmaps.nii",
                 "rest_hcp_agg__component_ica_.nii"]

    assert_equal(len(tst.mock_url_request.urls), 3)
    for key, fn in zip(keys, filenames):
        assert_equal(bunch[key], os.path.join(tst.tmpdir, 'allen_rsn_2011', fn))

    assert_not_equal(bunch.description, '')
Esempio n. 2
0
def test_fetch_atlas_allen_2011(tmp_path, request_mocker):
    bunch = atlas.fetch_atlas_allen_2011(data_dir=str(tmp_path), verbose=0)
    keys = ("maps", "rsn28", "comps")

    filenames = [
        "ALL_HC_unthresholded_tmaps.nii.gz",
        "RSN_HC_unthresholded_tmaps.nii.gz",
        "rest_hcp_agg__component_ica_.nii.gz"
    ]

    assert request_mocker.url_count == 1
    for key, fn in zip(keys, filenames):
        assert bunch[key] == str(tmp_path / 'allen_rsn_2011' /
                                 'allen_rsn_2011' / fn)

    assert bunch.description != ''