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

Function test_input_stream_file_path

python/pyarrow/tests/test_io.py:1941–1952  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

1939
1940
1941def test_input_stream_file_path(tmpdir):
1942 data = b"some test data\n" * 10 + b"eof\n"
1943 file_path = tmpdir / 'input_stream'
1944 with open(str(file_path), 'wb') as f:
1945 f.write(data)
1946
1947 stream = pa.input_stream(file_path)
1948 assert stream.read() == data
1949 stream = pa.input_stream(str(file_path))
1950 assert stream.read() == data
1951 stream = pa.input_stream(pathlib.Path(str(file_path)))
1952 assert stream.read() == data
1953
1954
1955@pytest.mark.gzip

Callers

nothing calls this directly

Calls 3

writeMethod · 0.45
readMethod · 0.45
PathMethod · 0.45

Tested by

no test coverage detected