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

Function test_input_stream_errors

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

Source from the content-addressed store, hash-verified

2044
2045
2046def test_input_stream_errors(tmpdir):
2047 buf = memoryview(b"")
2048 with pytest.raises(ValueError):
2049 pa.input_stream(buf, compression="foo")
2050
2051 for arg in [bytearray(), StringIO()]:
2052 with pytest.raises(TypeError):
2053 pa.input_stream(arg)
2054
2055 with assert_file_not_found():
2056 pa.input_stream("non_existent_file")
2057
2058 with open(str(tmpdir / 'new_file'), 'wb') as f:
2059 with pytest.raises(TypeError, match="readable file expected"):
2060 pa.input_stream(f)
2061
2062
2063def test_output_stream_buffer():

Callers

nothing calls this directly

Calls 1

assert_file_not_foundFunction · 0.85

Tested by

no test coverage detected