()
| 1040 | |
| 1041 | |
| 1042 | def test_dunders_checked_overflow(): |
| 1043 | # GH-32007 |
| 1044 | error_match = "overflow" |
| 1045 | scl = pa.scalar(127, type=pa.int8()) |
| 1046 | |
| 1047 | with pytest.raises(pa.ArrowInvalid, match=error_match): |
| 1048 | scl + scl |
| 1049 | with pytest.raises(pa.ArrowInvalid, match=error_match): |
| 1050 | scl - (-scl) |
| 1051 | with pytest.raises(pa.ArrowInvalid, match=error_match): |
| 1052 | scl ** scl |
| 1053 | with pytest.raises(pa.ArrowInvalid, match=error_match): |
| 1054 | scl * scl |
| 1055 | |
| 1056 | |
| 1057 | @pytest.mark.parametrize("op", [ |