MCPcopy Create free account
hub / github.com/apache/arrow / test_open_input_stream

Function test_open_input_stream

python/pyarrow/tests/test_fs.py:1028–1038  ·  view source on GitHub ↗
(fs, pathfn, compression, buffer_size, compressor)

Source from the content-addressed store, hash-verified

1026 ]
1027)
1028def test_open_input_stream(fs, pathfn, compression, buffer_size, compressor):
1029 p = pathfn('open-input-stream')
1030
1031 data = b'some data for reading\n' * 512
1032 with fs.open_output_stream(p) as s:
1033 s.write(compressor(data))
1034
1035 with fs.open_input_stream(p, compression, buffer_size) as s:
1036 result = s.read()
1037
1038 assert result == data
1039
1040
1041def test_open_input_file(fs, pathfn):

Callers

nothing calls this directly

Calls 5

pathfnFunction · 0.85
open_output_streamMethod · 0.45
writeMethod · 0.45
open_input_streamMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected