diff --git a/pandas/conftest.py b/pandas/conftest.py index f948dc11bc014..329023ed7ba6a 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -66,6 +66,11 @@ MultiIndex, ) +# Until https://github.com/numpy/numpy/issues/19078 is sorted out, just suppress +suppress_npdev_promotion_warning = pytest.mark.filterwarnings( + "ignore:Promotion of numbers and bools:FutureWarning" +) + # ---------------------------------------------------------------- # Configuration / Settings # ---------------------------------------------------------------- @@ -112,6 +117,8 @@ def pytest_collection_modifyitems(items): if "/frame/" in item.nodeid: item.add_marker(pytest.mark.arraymanager) + item.add_marker(suppress_npdev_promotion_warning) + # Hypothesis hypothesis.settings.register_profile( diff --git a/pandas/tests/arithmetic/test_interval.py b/pandas/tests/arithmetic/test_interval.py index 1bbe90f3cb58c..12220e825aed4 100644 --- a/pandas/tests/arithmetic/test_interval.py +++ b/pandas/tests/arithmetic/test_interval.py @@ -238,7 +238,7 @@ def test_compare_list_like_nan(self, op, interval_array, nulls_fixture, request) Categorical(list("abab")), Categorical(date_range("2017-01-01", periods=4)), pd.array(list("abcd")), - pd.array(["foo", 3.14, None, object()]), + pd.array(["foo", 3.14, None, object()], dtype=object), ], ids=lambda x: str(x.dtype), ) diff --git a/pandas/tests/frame/methods/test_to_records.py b/pandas/tests/frame/methods/test_to_records.py index 2c96cf291c154..ba8fe25401e8c 100644 --- a/pandas/tests/frame/methods/test_to_records.py +++ b/pandas/tests/frame/methods/test_to_records.py @@ -3,6 +3,8 @@ import numpy as np import pytest +from pandas.compat import is_numpy_dev + from pandas import ( CategoricalDtype, DataFrame, @@ -171,20 +173,28 @@ def test_to_records_with_categorical(self): ), ), # Pass in a type instance. - ( + pytest.param( {"column_dtypes": str}, np.rec.array( [("0", "1", "0.2", "a"), ("1", "2", "1.5", "bc")], dtype=[("index", "