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


##########
python/pyarrow/tests/test_pandas.py:
##########
@@ -95,9 +96,13 @@ def _check_pandas_roundtrip(df, expected=None, 
use_threads=False,
     if expected is None:
         expected = df
 
-    tm.assert_frame_equal(result, expected, check_dtype=check_dtype,
-                          check_index_type=('equiv' if preserve_index
-                                            else False))
+    # pandas.testing generates a
+    # DeprecationWarning: elementwise comparison failed
+    with warnings.catch_warnings():
+        warnings.simplefilter("ignore", DeprecationWarning)
+        tm.assert_frame_equal(result, expected, check_dtype=check_dtype,
+                              check_index_type=('equiv' if preserve_index
+                                                else False))

Review Comment:
   Could we be more specific in which warning we are catching? (so are not 
catching any future deprecation warning, but only specifically the current 
numpy one)
   
   (for example with `filterwarnings()` instead of `simplefilter` where we can 
also specify the module / message, similarly to the 
`pytest.mark.filterwarnings`. Or just use that mark) 



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