@testing.requires_testing_data
def test_bem_model():
 tempdir = _TempDir()
 fname_temp = op.join(tempdir, 'temp-bem.fif')
 for (kwargs, fname) in zip((dict(), dict(conductivity=[0.3])), [fname_bem_3, fname_bem_1]):
  model = make_bem_model('sample', ico=2, subjects_dir=subjects_dir, **kwargs)
  model_c = read_bem_surfaces(fname)
  _compare_bem_surfaces(model, model_c)
  write_bem_surfaces(fname_temp, model)
  model_read = read_bem_surfaces(fname_temp)
  _compare_bem_surfaces(model, model_c)
  _compare_bem_surfaces(model_read, model_c)
 assert_raises(ValueError, make_bem_model, 'sample', conductivity=[0.3, 0.006], subjects_dir=subjects_dir)

@ testing . requires_testing_data def test_bem_model ( ) : tempdir = _TempDir ( ) fname_temp = op . join ( tempdir , 'temp-bem.fif' ) for ( kwargs , fname ) in zip ( ( dict ( ) , dict ( conductivity = [ 0.3 ] ) ) , [ fname_bem_3 , fname_bem_1 ] ) : model = make_bem_model ( 'sample' , ico = 2 , subjects_dir = subjects_dir , ** kwargs ) model_c = read_bem_surfaces ( fname ) _compare_bem_surfaces ( model , model_c ) write_bem_surfaces ( fname_temp , model ) model_read = read_bem_surfaces ( fname_temp ) _compare_bem_surfaces ( model , model_c ) _compare_bem_surfaces ( model_read , model_c ) assert_raises ( ValueError , make_bem_model , 'sample' , conductivity = [ 0.3 , 0.006 ] , subjects_dir = subjects_dir )
test bem model creation from python with i/o .