Skip to content

Backport PR #41730: CI: suppress npdev warnings #41762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
ENV_FILE: ci/deps/azure-38-numpydev.yaml
CONDA_PY: "38"
PATTERN: "not slow and not network"
TEST_ARGS: "-W error"
TEST_ARGS: "-W error -W \"ignore:Promotion of numbers and bools:FutureWarning\""
PANDAS_TESTING_MODE: "deprecate"
EXTRA_APT: "xsel"

Expand Down
1 change: 1 addition & 0 deletions pandas/tests/arithmetic/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def xbox2(x):
"Invalid comparison between",
"Cannot compare type",
"not supported between",
"could not be promoted",
"invalid type promotion",
(
# GH#36706 npdev 1.20.0 2020-09-28
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/arithmetic/test_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_compare_list_like_nan(self, op, 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),
)
Expand Down
14 changes: 12 additions & 2 deletions pandas/tests/frame/methods/test_to_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import numpy as np
import pytest

from pandas.compat.numpy import is_numpy_dev

from pandas import (
CategoricalDtype,
DataFrame,
Expand Down Expand Up @@ -162,20 +164,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", "<i8"), ("A", "<U"), ("B", "<U"), ("C", "<U")],
),
marks=pytest.mark.xfail(
is_numpy_dev,
reason="https://github.com/numpy/numpy/issues/19078",
),
),
# Pass in a dtype instance.
(
pytest.param(
{"column_dtypes": np.dtype("unicode")},
np.rec.array(
[("0", "1", "0.2", "a"), ("1", "2", "1.5", "bc")],
dtype=[("index", "<i8"), ("A", "<U"), ("B", "<U"), ("C", "<U")],
),
marks=pytest.mark.xfail(
is_numpy_dev,
reason="https://github.com/numpy/numpy/issues/19078",
),
),
# Pass in a dictionary (name-only).
(
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/frame/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def check(df, df2):
msgs = [
r"Invalid comparison between dtype=datetime64\[ns\] and ndarray",
"invalid type promotion",
"could not be promoted",
(
# npdev 1.20.0
r"The DTypes <class 'numpy.dtype\[.*\]'> and "
Expand Down