@slow_test
@testing.requires_testing_data
def test_write_source_space():
 tempdir = _TempDir()
 src0 = read_source_spaces(fname, patch_stats=False)
 write_source_spaces(op.join(tempdir, 'tmp-src.fif'), src0)
 src1 = read_source_spaces(op.join(tempdir, 'tmp-src.fif'), patch_stats=False)
 _compare_source_spaces(src0, src1)
 with warnings.catch_warnings(record=True) as w:
  warnings.simplefilter('always')
  src_badname = op.join(tempdir, 'test-bad-name.fif.gz')
  write_source_spaces(src_badname, src0)
  read_source_spaces(src_badname)
 assert_naming(w, 'test_source_space.py', 2)

@ slow_test @ testing . requires_testing_data def test_write_source_space ( ) : tempdir = _TempDir ( ) src0 = read_source_spaces ( fname , patch_stats = False ) write_source_spaces ( op . join ( tempdir , 'tmp-src.fif' ) , src0 ) src1 = read_source_spaces ( op . join ( tempdir , 'tmp-src.fif' ) , patch_stats = False ) _compare_source_spaces ( src0 , src1 ) with warnings . catch_warnings ( record = True ) as w : warnings . simplefilter ( 'always' ) src_badname = op . join ( tempdir , 'test-bad-name.fif.gz' ) write_source_spaces ( src_badname , src0 ) read_source_spaces ( src_badname ) assert_naming ( w , 'test_source_space.py' , 2 )
test reading and writing of source spaces .