(ty)
| 875 | @pytest.mark.large_memory |
| 876 | @pytest.mark.parametrize("ty", [pa.binary(), pa.string(), pa.string_view()]) |
| 877 | def test_string_too_large(ty): |
| 878 | # Construct a binary array with a single value larger than 4GB |
| 879 | s = b"0123456789abcdefghijklmnopqrstuvwxyz" |
| 880 | nrepeats = math.ceil((2**32 + 5) / len(s)) |
| 881 | with pytest.raises(pa.ArrowCapacityError): |
| 882 | pa.array([b"foo", s * nrepeats, None, b"bar"], type=ty) |
| 883 | |
| 884 | |
| 885 | def test_sequence_bytes(): |