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

Function test_output_stream_errors

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

Source from the content-addressed store, hash-verified

2229
2230
2231def test_output_stream_errors(tmpdir):
2232 buf = memoryview(bytearray())
2233 with pytest.raises(ValueError):
2234 pa.output_stream(buf, compression="foo")
2235
2236 for arg in [bytearray(), StringIO()]:
2237 with pytest.raises(TypeError):
2238 pa.output_stream(arg)
2239
2240 fn = str(tmpdir / 'new_file')
2241 with open(fn, 'wb') as f:
2242 pass
2243 with open(fn, 'rb') as f:
2244 with pytest.raises(TypeError, match="writable file expected"):
2245 pa.output_stream(f)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected