jorisvandenbossche commented on code in PR #36701:
URL: https://github.com/apache/arrow/pull/36701#discussion_r1611209296


##########
python/pyarrow/tests/test_array.py:
##########
@@ -2355,32 +2355,33 @@ def test_array_from_numpy_timedelta_incorrect_unit():
             pa.array(data)
 
 
-def test_array_from_numpy_ascii():
[email protected]('binary_type', [pa.binary(), pa.large_binary()])

Review Comment:
   OK, one last comment (promised! ;)): I think we want to keep testing the 
below also in the case of not specifying the type (in which case we infer the 
small types), and I am not entirely sure this is explicitly covered elsewhere 
(implicitly for sure). But so could parametrize this slightly differently with:
   
   ```suggestion
   @pytest.mark.parametrize('typ, expected_type', [(None, pa.binary()), 
(pa.binary(), pa.binary()), (pa.large_binary(), pa.large_binary())])
   ```
   
   And then the same for string test below.
   
   Or, maybe simpler, just duplicate the first case to have a version without a 
type specified:
   
   ```
       # without specified type, always binary
       arrow_arr = pa.array(arr)
       assert arrow_arr.type == 'binary'
       expected = ..
   
       arrow_arr = pa.array(arr, binary_type)
       assert arrow_arr.type == binary_type
       expected = ..
   ```
   
   (I assume that for the inference it shouldn't matter if there are strides or 
not)



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