test_frame_8.py 342 B

123456789101112
  1. import lz4.frame as lz4frame
  2. def test_lz4frame_open_write_read_text_iter():
  3. data = u'This is a test string'
  4. with lz4frame.open('testfile', mode='wt') as fp:
  5. fp.write(data)
  6. data_out = ''
  7. with lz4frame.open('testfile', mode='rt') as fp:
  8. for line in fp:
  9. data_out += line
  10. assert data_out == data