MCPcopy Create free account
hub / github.com/apache/arrow / test_string_too_large

Function test_string_too_large

python/pyarrow/tests/test_convert_builtin.py:877–882  ·  view source on GitHub ↗
(ty)

Source from the content-addressed store, hash-verified

875@pytest.mark.large_memory
876@pytest.mark.parametrize("ty", [pa.binary(), pa.string(), pa.string_view()])
877def 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
885def test_sequence_bytes():

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected