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

Function test_input_stream_errors

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

Source from the content-addressed store, hash-verified

2019
2020
2021def test_input_stream_errors(tmpdir):
2022 buf = memoryview(b"")
2023 with pytest.raises(ValueError):
2024 pa.input_stream(buf, compression="foo")
2025
2026 for arg in [bytearray(), StringIO()]:
2027 with pytest.raises(TypeError):
2028 pa.input_stream(arg)
2029
2030 with assert_file_not_found():
2031 pa.input_stream("non_existent_file")
2032
2033 with open(str(tmpdir / 'new_file'), 'wb') as f:
2034 with pytest.raises(TypeError, match="readable file expected"):
2035 pa.input_stream(f)
2036
2037
2038def test_output_stream_buffer():

Callers

nothing calls this directly

Calls 1

assert_file_not_foundFunction · 0.85

Tested by

no test coverage detected