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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

write_featherFunction · 0.90
lenFunction · 0.85

Tested by

no test coverage detected