AlenkaF commented on code in PR #34275:
URL: https://github.com/apache/arrow/pull/34275#discussion_r1113950357


##########
python/pyarrow/tests/test_array.py:
##########
@@ -3381,3 +3381,15 @@ def test_struct_array_sort():
         {"a": 5, "b": "foo"},
         None
     ]
+
+
+def test_array_accepts_pyarrow_array():
+    arr = pa.array([1, 2, 3])
+    result = pa.array(arr)
+
+    assert arr == result
+
+    arr_uint = pa.array([1, 2, 3], type=pa.uint8())
+    result = pa.array(arr, type=pa.uint8())

Review Comment:
   You mean adding a test where `arr` type and type passed is different? I do 
not think I follow - it should be the case here (`arr` is of type int64 and the 
test passes uint8 type to check the casting?)
   
   I will rename `arr_uint` to `expected` just to make it clearer.



-- 
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]

Reply via email to