Skip to content

Commit

Permalink
Test Codec compression_level attr
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Aug 23, 2022
1 parent febd2ef commit 6b49d22
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/pyarrow/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,12 @@ def test_compression_level(compression):
if not Codec.is_available(compression):
pytest.skip("{} support is not built".format(compression))

codec = Codec(compression)
if codec.name == "snappy":
assert codec.compression_level is None
else:
assert isinstance(codec.compression_level, int)

# These codecs do not support a compression level
no_level = ['snappy']
if compression in no_level:
Expand Down

0 comments on commit 6b49d22

Please sign in to comment.