def test_io_mrk():
 tempdir = _TempDir()
 pts = read_mrk(mrk_fname)
 path = os.path.join(tempdir, 'mrk.txt')
 _write_dig_points(path, pts)
 pts_2 = read_mrk(path)
 assert_array_equal(pts, pts_2, 'read/write mrk to text')
 fname = os.path.join(tempdir, 'mrk.pickled')
 with open(fname, 'wb') as fid:
  pickle.dump(dict(mrk=pts), fid)
 pts_2 = read_mrk(fname)
 assert_array_equal(pts_2, pts, 'pickle mrk')
 with open(fname, 'wb') as fid:
  pickle.dump(dict(), fid)
 assert_raises(ValueError, read_mrk, fname)
 assert_raises(ValueError, read_mrk, 'file.ext')

def test_io_mrk ( ) : tempdir = _TempDir ( ) pts = read_mrk ( mrk_fname ) path = os . path . join ( tempdir , 'mrk.txt' ) _write_dig_points ( path , pts ) pts_2 = read_mrk ( path ) assert_array_equal ( pts , pts_2 , 'read/write mrk to text' ) fname = os . path . join ( tempdir , 'mrk.pickled' ) with open ( fname , 'wb' ) as fid : pickle . dump ( dict ( mrk = pts ) , fid ) pts_2 = read_mrk ( fname ) assert_array_equal ( pts_2 , pts , 'pickle mrk' ) with open ( fname , 'wb' ) as fid : pickle . dump ( dict ( ) , fid ) assert_raises ( ValueError , read_mrk , fname ) assert_raises ( ValueError , read_mrk , 'file.ext' )
test io for mrk files .