(bits)
| 497 | |
| 498 | @pytest.mark.parametrize("bits", [8, 16, 32, 64]) |
| 499 | def test_signed_integer_overflow(bits): |
| 500 | ty = getattr(pa, "int%d" % bits)() |
| 501 | # XXX ideally would always raise OverflowError |
| 502 | with pytest.raises((OverflowError, pa.ArrowInvalid)): |
| 503 | pa.array([2 ** (bits - 1)], ty) |
| 504 | with pytest.raises((OverflowError, pa.ArrowInvalid)): |
| 505 | pa.array([-2 ** (bits - 1) - 1], ty) |
| 506 | |
| 507 | |
| 508 | @pytest.mark.parametrize("bits", [8, 16, 32, 64]) |