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

Function test_bitwise_dunders

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

Source from the content-addressed store, hash-verified

4657
4658
4659def test_bitwise_dunders():
4660 # GH-32007
4661 arr1 = pa.array([-1, 2, -3])
4662 arr2 = pa.array([2, 4, 5])
4663
4664 assert (arr1 & arr2).equals(pc.bit_wise_and(arr1, arr2))
4665 assert (arr1 | arr2).equals(pc.bit_wise_or(arr1, arr2))
4666 assert (arr1 ^ arr2).equals(pc.bit_wise_xor(arr1, arr2))
4667 assert (arr1 << arr2).equals(pc.shift_left_checked(arr1, arr2))
4668 assert (arr1 >> arr2).equals(pc.shift_right_checked(arr1, arr2))
4669
4670
4671def test_dunders_unmatching_types():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected