aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/lz4/py2/tests/frame/test_frame_8.py
blob: 159534aefec955cb6b524a137e7048fed1a9fc7f (plain) (blame)
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