예제 #1
0
def test_fetch_development_fmri_participants(tmp_path, request_mocker):
    mock_participants = _mock_participants_data()
    request_mocker.url_mapping[
        "https://osf.io/yr3av/download"] = mock_participants.to_csv(
            index=False, sep="\t")
    participants = func._fetch_development_fmri_participants(
        data_dir=str(tmp_path), url=None, verbose=1)
    assert isinstance(participants, np.ndarray)
    assert participants.shape == (5, )
예제 #2
0
def test_fetch_development_fmri_participants(tmp_path, request_mocker):
    csv = _mock_participants_data()
    tst.mock_fetch_files.add_csv('participants.tsv', csv)
    local_url = 'file://' + os.path.join(tst.datadir)

    participants = func._fetch_development_fmri_participants(
        data_dir=str(tmp_path), url=local_url, verbose=1)
    assert isinstance(participants, np.ndarray)
    assert participants.shape == (5, )
예제 #3
0
def test_fetch_development_fmri_participants():
    csv = _mock_participants_data()
    tst.mock_fetch_files.add_csv('participants.tsv', csv)
    local_url = 'file://' + os.path.join(tst.datadir)

    participants = func._fetch_development_fmri_participants(
        data_dir=tst.tmpdir, url=local_url, verbose=1)
    assert_true(isinstance(participants, np.ndarray))
    assert_equal(participants.shape, (5, ))
예제 #4
0
파일: test_func.py 프로젝트: mrahim/nilearn
def test_fetch_development_fmri_participants():
    csv = _mock_participants_data()
    tst.mock_fetch_files.add_csv('participants.tsv', csv)
    local_url = 'file://' + os.path.join(tst.datadir)

    participants = func._fetch_development_fmri_participants(data_dir=tst.tmpdir,
                                                             url=local_url,
                                                             verbose=1)
    assert_true(isinstance(participants, np.ndarray))
    assert_equal(participants.shape, (5,))