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

Function test_dunders_checked_overflow

python/pyarrow/tests/test_array.py:4698–4712  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4696
4697
4698def test_dunders_checked_overflow():
4699 # GH-32007
4700 arr = pa.array([127, -128], type=pa.int8())
4701 error_match = "overflow"
4702
4703 with pytest.raises(pa.ArrowInvalid, match=error_match):
4704 arr + arr
4705 with pytest.raises(pa.ArrowInvalid, match=error_match):
4706 arr * arr
4707 with pytest.raises(pa.ArrowInvalid, match=error_match):
4708 arr - (-arr)
4709 with pytest.raises(pa.ArrowInvalid, match=error_match):
4710 arr ** pa.scalar(2, type=pa.int8())
4711 with pytest.raises(pa.ArrowInvalid, match=error_match):
4712 arr / (-arr)
4713
4714
4715@pytest.mark.parametrize("index_type", [pa.int8(), pa.int16(), pa.int32(), pa.int64(),

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.45
scalarMethod · 0.45

Tested by

no test coverage detected