()
| 591 | |
| 592 | |
| 593 | def test_fixed_size_binary(): |
| 594 | s = pa.scalar(b'foof', type=pa.binary(4)) |
| 595 | assert isinstance(s, pa.FixedSizeBinaryScalar) |
| 596 | assert s.as_py() == b'foof' |
| 597 | assert bytes(s) == b'foof' |
| 598 | |
| 599 | with pytest.raises(pa.ArrowInvalid): |
| 600 | pa.scalar(b'foof5', type=pa.binary(4)) |
| 601 | |
| 602 | |
| 603 | @pytest.mark.parametrize(('ty', 'klass'), [ |