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:2098–2110  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

2096
2097
2098def test_output_stream_file_path(tmpdir):
2099 data = b"some test data\n" * 10 + b"eof\n"
2100 file_path = tmpdir / 'output_stream'
2101
2102 def check_data(file_path, data):
2103 with pa.output_stream(file_path) as stream:
2104 stream.write(data)
2105 with open(str(file_path), 'rb') as f:
2106 assert f.read() == data
2107
2108 check_data(file_path, data)
2109 check_data(str(file_path), data)
2110 check_data(pathlib.Path(str(file_path)), data)
2111
2112
2113@pytest.mark.gzip

Callers

nothing calls this directly

Calls 2

check_dataFunction · 0.85
PathMethod · 0.45

Tested by

no test coverage detected