pitrou commented on code in PR #39592:
URL: https://github.com/apache/arrow/pull/39592#discussion_r1480277621
##########
python/pyarrow/tests/test_types.py:
##########
@@ -885,18 +885,32 @@ def test_type_id():
assert isinstance(ty.id, int)
-def test_bit_width():
- for ty, expected in [(pa.bool_(), 1),
- (pa.int8(), 8),
- (pa.uint32(), 32),
- (pa.float16(), 16),
- (pa.decimal128(19, 4), 128),
- (pa.decimal256(76, 38), 256),
- (pa.binary(42), 42 * 8)]:
- assert ty.bit_width == expected
- for ty in [pa.binary(), pa.string(), pa.list_(pa.int16())]:
+def test_bit_and_byte_width():
+ for ty, expected_bit_width, expected_byte_width in [
+ (pa.bool_(), 1, 0),
Review Comment:
Why would the boolean type return a byte width of 0? It should probably
raise a ValueError.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]