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

Function test_unsigned_integer_overflow

python/pyarrow/tests/test_convert_builtin.py:509–515  ·  view source on GitHub ↗
(bits)

Source from the content-addressed store, hash-verified

507
508@pytest.mark.parametrize("bits", [8, 16, 32, 64])
509def 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

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected