rmnskb commented on code in PR #48085:
URL: https://github.com/apache/arrow/pull/48085#discussion_r2778060695
##########
python/pyarrow/tests/test_array.py:
##########
@@ -4398,3 +4399,67 @@ def test_non_cpu_array():
arr.tolist()
with pytest.raises(NotImplementedError):
arr.validate(full=True)
+
+
[email protected]
+def int_arrays():
+ arr1 = pa.array([-1, 2, -3])
+ arr2 = pa.array([2, 4, 5])
+
+ return arr1, arr2
+
+
[email protected]
+def float_arrays():
+ arr1 = pa.array([-1.1, 2.2, -3.3])
+ arr2 = pa.array([2.2, 4.4, 5.5])
+
+ return arr1, arr2
+
+
+def test_arithmetic_dunders(float_arrays):
+ # GH-32007
+ arr1, arr2 = float_arrays
+
+ assert (arr1 + arr2).equals(pc.add_checked(arr1, arr2))
Review Comment:
The overall intention of this was to test that the dunder methods have the
same output given the same input (kernels as well). Albeit, your suggestion is
valid, so added extra tests to cover whether dunder methods indeed overflow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]