amoeba commented on code in PR #46286:
URL: https://github.com/apache/arrow/pull/46286#discussion_r2133171154
##########
python/pyarrow/tests/test_compute.py:
##########
@@ -3786,19 +3786,52 @@ def test_list_slice_bad_parameters():
pc.list_slice(arr, 0, 1, step=-1)
-def check_run_end_encode_decode(run_end_encode_opts=None):
- arr = pa.array([1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3])
+def check_run_end_encode_decode(value_type, run_end_encode_opts=None):
+ values = [1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3]
+
+ # pa.float16() is special and requires us to pass np.float16 dtype values
+ # but we want to skip if numpy isn't available so we're still running all
+ # the other tests when it isn't
+ if value_type is pa.float16():
+ if np is not None:
+ values = np.float16(values)
+ else:
+ pytest.skip("numpy is not available and is required for
pa.float16()")
Review Comment:
Thanks for the ping. Simplified in de0d89e8804d107d3d1dc94179ef947c59521bc8.
--
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]