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

Source from the content-addressed store, hash-verified

2104
2105
2106def test_output_stream_file_path(tmpdir):
2107 data = b"some test data\n" * 10 + b"eof\n"
2108 file_path = tmpdir / 'output_stream'
2109
2110 def check_data(file_path, data):
2111 with pa.output_stream(file_path) as stream:
2112 stream.write(data)
2113 with open(str(file_path), 'rb') as f:
2114 assert f.read() == data
2115
2116 check_data(file_path, data)
2117 check_data(str(file_path), data)
2118 check_data(pathlib.Path(str(file_path)), data)
2119
2120
2121@pytest.mark.gzip

Callers

nothing calls this directly

Calls 2

check_dataFunction · 0.85
PathMethod · 0.45

Tested by

no test coverage detected