def test_ad_hoc_cov():
 tempdir = _TempDir()
 out_fname = op.join(tempdir, 'test-cov.fif')
 evoked = read_evokeds(ave_fname)[0]
 cov = make_ad_hoc_cov(evoked.info)
 cov.save(out_fname)
 assert_true(('Covariance' in repr(cov)))
 cov2 = read_cov(out_fname)
 assert_array_almost_equal(cov['data'], cov2['data'])

def test_ad_hoc_cov ( ) : tempdir = _TempDir ( ) out_fname = op . join ( tempdir , 'test-cov.fif' ) evoked = read_evokeds ( ave_fname ) [ 0 ] cov = make_ad_hoc_cov ( evoked . info ) cov . save ( out_fname ) assert_true ( ( 'Covariance' in repr ( cov ) ) ) cov2 = read_cov ( out_fname ) assert_array_almost_equal ( cov [ 'data' ] , cov2 [ 'data' ] )
test ad hoc cov creation and i/o .