pitrou commented on code in PR #46778:
URL: https://github.com/apache/arrow/pull/46778#discussion_r2140508803


##########
python/pyarrow/tests/test_array.py:
##########
@@ -536,6 +536,26 @@ def test_array_slice_negative_step():
         assert result.equals(expected)
 
 
+def test_arange():
+    cases = [
+        (0, 10),  # Default step
+        (0, 10, 1),
+        (0, 10, 2),
+        (10, 0, -1),
+        (10, 0, -2),
+        (0, 0),       # Empty array
+        (0, 10, -1),  # Empty array
+        (10, 0, 1),   # Empty array
+    ]
+    for case in cases:
+        result = pa.arange(*case)

Review Comment:
   Validating results is a good habit to take in unit tests
   ```suggestion
           result = pa.arange(*case)
           result.validate(full=True)
   ```



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to