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

Function test_input_stream_errors

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

Source from the content-addressed store, hash-verified

2052
2053
2054def test_input_stream_errors(tmpdir):
2055 buf = memoryview(b"")
2056 with pytest.raises(ValueError):
2057 pa.input_stream(buf, compression="foo")
2058
2059 for arg in [bytearray(), StringIO()]:
2060 with pytest.raises(TypeError):
2061 pa.input_stream(arg)
2062
2063 with assert_file_not_found():
2064 pa.input_stream("non_existent_file")
2065
2066 with open(str(tmpdir / 'new_file'), 'wb') as f:
2067 with pytest.raises(TypeError, match="readable file expected"):
2068 pa.input_stream(f)
2069
2070
2071def test_output_stream_buffer():

Callers

nothing calls this directly

Calls 1

assert_file_not_foundFunction · 0.85

Tested by

no test coverage detected