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

Function test_v2_lz4_default_compression

python/pyarrow/tests/test_feather.py:682–699  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

680
681@pytest.mark.numpy
682def test_v2_lz4_default_compression():
683 # ARROW-8750: Make sure that the compression=None option selects lz4 if
684 # it's available
685 if not pa.Codec.is_available('lz4_frame'):
686 pytest.skip("LZ4 compression support is not built in C++")
687
688 # some highly compressible data
689 t = pa.table([np.repeat(0, 100000)], names=['f0'])
690
691 buf = io.BytesIO()
692 write_feather(t, buf)
693 default_result = buf.getvalue()
694
695 buf = io.BytesIO()
696 write_feather(t, buf, compression='uncompressed')
697 uncompressed_result = buf.getvalue()
698
699 assert len(default_result) < len(uncompressed_result)
700
701
702def test_v1_unsupported_types():

Callers

nothing calls this directly

Calls 2

write_featherFunction · 0.90
lenFunction · 0.85

Tested by

no test coverage detected