def test_bytes_io():
 for (pdf, config, hs) in zip(pdf_fnames, config_fnames, hs_fnames):
  raw = read_raw_bti(pdf, config, hs, convert=True, preload=False)
  with open(pdf, 'rb') as fid:
   pdf = six.BytesIO(fid.read())
  with open(config, 'rb') as fid:
   config = six.BytesIO(fid.read())
  with open(hs, 'rb') as fid:
   hs = six.BytesIO(fid.read())
  raw2 = read_raw_bti(pdf, config, hs, convert=True, preload=False)
  repr(raw2)
  assert_array_equal(raw[:][0], raw2[:][0])

def test_bytes_io ( ) : for ( pdf , config , hs ) in zip ( pdf_fnames , config_fnames , hs_fnames ) : raw = read_raw_bti ( pdf , config , hs , convert = True , preload = False ) with open ( pdf , 'rb' ) as fid : pdf = six . BytesIO ( fid . read ( ) ) with open ( config , 'rb' ) as fid : config = six . BytesIO ( fid . read ( ) ) with open ( hs , 'rb' ) as fid : hs = six . BytesIO ( fid . read ( ) ) raw2 = read_raw_bti ( pdf , config , hs , convert = True , preload = False ) repr ( raw2 ) assert_array_equal ( raw [ : ] [ 0 ] , raw2 [ : ] [ 0 ] )
test bti bytes-io api .