(bits)
| 507 | |
| 508 | @pytest.mark.parametrize("bits", [8, 16, 32, 64]) |
| 509 | def test_unsigned_integer_overflow(bits): |
| 510 | ty = getattr(pa, "uint%d" % bits)() |
| 511 | # XXX ideally would always raise OverflowError |
| 512 | with pytest.raises((OverflowError, pa.ArrowInvalid)): |
| 513 | pa.array([2 ** bits], ty) |
| 514 | with pytest.raises((OverflowError, pa.ArrowInvalid)): |
| 515 | pa.array([-1], ty) |
| 516 | |
| 517 | |
| 518 | @parametrize_with_collections_types |