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

Function test_output_stream_file_path

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

Source from the content-addressed store, hash-verified

2071
2072
2073def test_output_stream_file_path(tmpdir):
2074 data = b"some test data\n" * 10 + b"eof\n"
2075 file_path = tmpdir / 'output_stream'
2076
2077 def check_data(file_path, data):
2078 with pa.output_stream(file_path) as stream:
2079 stream.write(data)
2080 with open(str(file_path), 'rb') as f:
2081 assert f.read() == data
2082
2083 check_data(file_path, data)
2084 check_data(str(file_path), data)
2085 check_data(pathlib.Path(str(file_path)), data)
2086
2087
2088@pytest.mark.gzip

Callers

nothing calls this directly

Calls 2

check_dataFunction · 0.85
PathMethod · 0.45

Tested by

no test coverage detected