File: test_frame_8.py

package info (click to toggle)
python-lz4 4.0.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 572 kB
  • sloc: ansic: 3,089; python: 2,660; makefile: 147
file content (12 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
import lz4.frame as lz4frame


def test_lz4frame_open_write_read_text_iter():
    data = u'This is a test string'
    with lz4frame.open('testfile', mode='wt') as fp:
        fp.write(data)
    data_out = ''
    with lz4frame.open('testfile', mode='rt') as fp:
        for line in fp:
            data_out += line
    assert data_out == data