def test_io_w():
 tempdir = _TempDir()
 stc = _fake_stc(n_time=1)
 w_fname = op.join(tempdir, 'fake')
 stc.save(w_fname, ftype='w')
 src = read_source_estimate(w_fname)
 src.save(op.join(tempdir, 'tmp'), ftype='w')
 src2 = read_source_estimate(op.join(tempdir, 'tmp-lh.w'))
 assert_array_almost_equal(src.data, src2.data)
 assert_array_almost_equal(src.lh_vertno, src2.lh_vertno)
 assert_array_almost_equal(src.rh_vertno, src2.rh_vertno)

def test_io_w ( ) : tempdir = _TempDir ( ) stc = _fake_stc ( n_time = 1 ) w_fname = op . join ( tempdir , 'fake' ) stc . save ( w_fname , ftype = 'w' ) src = read_source_estimate ( w_fname ) src . save ( op . join ( tempdir , 'tmp' ) , ftype = 'w' ) src2 = read_source_estimate ( op . join ( tempdir , 'tmp-lh.w' ) ) assert_array_almost_equal ( src . data , src2 . data ) assert_array_almost_equal ( src . lh_vertno , src2 . lh_vertno ) assert_array_almost_equal ( src . rh_vertno , src2 . rh_vertno )
test io for w files .