@testing.requires_testing_data
@requires_mne
def test_other_volume_source_spaces():
 tempdir = _TempDir()
 temp_name = op.join(tempdir, 'temp-src.fif')
 run_subprocess(['mne_volume_source_space', '--grid', '7.0', '--src', temp_name, '--mri', fname_mri])
 src = read_source_spaces(temp_name)
 src_new = setup_volume_source_space(None, pos=7.0, mri=fname_mri, subjects_dir=subjects_dir)
 _compare_source_spaces(src, src_new, mode='approx')
 assert_true(('volume, shape' in repr(src)))
 del src
 del src_new
 assert_raises(ValueError, setup_volume_source_space, 'sample', temp_name, pos=7.0, sphere=[1.0, 1.0], mri=fname_mri, subjects_dir=subjects_dir)
 run_subprocess(['mne_volume_source_space', '--grid', '7.0', '--src', temp_name])
 assert_raises(ValueError, read_source_spaces, temp_name)

@ testing . requires_testing_data @ requires_mne def test_other_volume_source_spaces ( ) : tempdir = _TempDir ( ) temp_name = op . join ( tempdir , 'temp-src.fif' ) run_subprocess ( [ 'mne_volume_source_space' , '--grid' , '7.0' , '--src' , temp_name , '--mri' , fname_mri ] ) src = read_source_spaces ( temp_name ) src_new = setup_volume_source_space ( None , pos = 7.0 , mri = fname_mri , subjects_dir = subjects_dir ) _compare_source_spaces ( src , src_new , mode = 'approx' ) assert_true ( ( 'volume, shape' in repr ( src ) ) ) del src del src_new assert_raises ( ValueError , setup_volume_source_space , 'sample' , temp_name , pos = 7.0 , sphere = [ 1.0 , 1.0 ] , mri = fname_mri , subjects_dir = subjects_dir ) run_subprocess ( [ 'mne_volume_source_space' , '--grid' , '7.0' , '--src' , temp_name ] ) assert_raises ( ValueError , read_source_spaces , temp_name )
test setting up other volume source spaces .