@testing.requires_testing_data
def test_dipole_fixed():
 dip = read_dipole(fname_xfit_dip)
 _check_roundtrip_fixed(dip)
 with warnings.catch_warnings(record=True) as w:
  dip_txt = read_dipole(fname_xfit_dip_txt)
 assert_true(any((('extra fields' in str(ww.message)) for ww in w)))
 assert_allclose(dip.info['chs'][0]['loc'][:3], dip_txt.pos[0])
 assert_allclose(dip_txt.amplitude[0], 1.21e-08)
 with warnings.catch_warnings(record=True):
  dip_txt_seq = read_dipole(fname_xfit_seq_txt)
 assert_allclose(dip_txt_seq.gof, [27.3, 46.4, 43.7, 41.0, 37.3, 32.5])

@ testing . requires_testing_data def test_dipole_fixed ( ) : dip = read_dipole ( fname_xfit_dip ) _check_roundtrip_fixed ( dip ) with warnings . catch_warnings ( record = True ) as w : dip_txt = read_dipole ( fname_xfit_dip_txt ) assert_true ( any ( ( ( 'extra fields' in str ( ww . message ) ) for ww in w ) ) ) assert_allclose ( dip . info [ 'chs' ] [ 0 ] [ 'loc' ] [ : 3 ] , dip_txt . pos [ 0 ] ) assert_allclose ( dip_txt . amplitude [ 0 ] , 1.21e-08 ) with warnings . catch_warnings ( record = True ) : dip_txt_seq = read_dipole ( fname_xfit_seq_txt ) assert_allclose ( dip_txt_seq . gof , [ 27.3 , 46.4 , 43.7 , 41.0 , 37.3 , 32.5 ] )
test reading a fixed-position dipole .