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

Function test_compressed_input_invalid

python/pyarrow/tests/test_io.py:1694–1704  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1692
1693@pytest.mark.gzip
1694def test_compressed_input_invalid():
1695 data = b"foo" * 10
1696 raw = pa.BufferReader(data)
1697 with pytest.raises(ValueError):
1698 pa.CompressedInputStream(raw, "unknown_compression")
1699 with pytest.raises(TypeError):
1700 pa.CompressedInputStream(raw, None)
1701
1702 with pa.CompressedInputStream(raw, "gzip") as compressed:
1703 with pytest.raises(IOError, match="zlib inflate failed"):
1704 compressed.read()
1705
1706
1707def make_compressed_output(data, fn, compression):

Callers

nothing calls this directly

Calls 2

BufferReaderMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected