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


##########
python/pyarrow/tests/test_table.py:
##########
@@ -143,14 +140,15 @@ def test_chunked_array_to_numpy():
 
 
 def test_chunked_array_mismatch_types():
-    with pytest.raises(TypeError):
+    msg = "chunks must all be same type"
+    with pytest.raises(pa.ArrowInvalid, match=msg):

Review Comment:
   Hmm... interesting. I would be in favor of changing the C++ side to return 
`TypeError` instead. Would you like to do that in this PR?



##########
python/pyarrow/tests/test_table.py:
##########
@@ -143,14 +140,15 @@ def test_chunked_array_to_numpy():
 
 
 def test_chunked_array_mismatch_types():
-    with pytest.raises(TypeError):
+    msg = "chunks must all be same type"
+    with pytest.raises(pa.ArrowInvalid, match=msg):
         # Given array types are different
         pa.chunked_array([
             pa.array([1, 2, 3]),
             pa.array([1., 2., 3.])
         ])
 
-    with pytest.raises(TypeError):
+    with pytest.raises(pa.ArrowInvalid, match=msg):

Review Comment:
   (same)



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