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:689–706  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

write_featherFunction · 0.90
lenFunction · 0.85

Tested by

no test coverage detected