Debian Codegraph @

tests/frame/test_frame_8.py

raw symbols SCIP
1 import threading
2 import lz4.frame as lz4frame
3
4
5 def test_lz4frame_open_write_read_text_iter(tmp_path):
6 data = u'This is a test string'
7 thread_id = threading.get_native_id()
8 with lz4frame.open(tmp_path / f'testfile_{thread_id}', mode='wt') as fp:
9 fp.write(data)
10 data_out = ''
11 with lz4frame.open(tmp_path / f'testfile_{thread_id}', mode='rt') as fp:
12 for line in fp:
13 data_out += line
14 assert data_out == data