Skip to content

CLN: remove xfails/skips for no-longer-supported numpys #36128

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 7 commits into from
Sep 4, 2020
2 changes: 1 addition & 1 deletion pandas/plotting/_matplotlib/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def get_standard_colors(
num_colors=None, colormap=None, color_type: str = "default", color=None
num_colors: int, colormap=None, color_type: str = "default", color=None
):
import matplotlib.pyplot as plt

Expand Down
5 changes: 1 addition & 4 deletions pandas/tests/arrays/sparse/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ def test_constructor_inferred_fill_value(self, data, fill_value):

@pytest.mark.parametrize("format", ["coo", "csc", "csr"])
@pytest.mark.parametrize(
"size",
[pytest.param(0, marks=td.skip_if_np_lt("1.16", reason="NumPy-11383")), 10],
"size", [0, 10],
)
@td.skip_if_no_scipy
def test_from_spmatrix(self, size, format):
Expand Down Expand Up @@ -904,7 +903,6 @@ def test_all(self, data, pos, neg):
([1.0, 2.0, 1.0], 1.0, 0.0),
],
)
@td.skip_if_np_lt("1.15") # prior didn't dispatch
def test_numpy_all(self, data, pos, neg):
# GH 17570
out = np.all(SparseArray(data))
Expand Down Expand Up @@ -956,7 +954,6 @@ def test_any(self, data, pos, neg):
([0.0, 2.0, 0.0], 2.0, 0.0),
],
)
@td.skip_if_np_lt("1.15") # prior didn't dispatch
def test_numpy_any(self, data, pos, neg):
# GH 17570
out = np.any(SparseArray(data))
Expand Down
58 changes: 8 additions & 50 deletions pandas/tests/frame/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,54 +1060,14 @@ def test_any_all_bool_only(self):
(np.any, {"A": pd.Series([0.0, 1.0], dtype="float")}, True),
(np.all, {"A": pd.Series([0, 1], dtype=int)}, False),
(np.any, {"A": pd.Series([0, 1], dtype=int)}, True),
pytest.param(
np.all,
{"A": pd.Series([0, 1], dtype="M8[ns]")},
False,
marks=[td.skip_if_np_lt("1.15")],
),
pytest.param(
np.any,
{"A": pd.Series([0, 1], dtype="M8[ns]")},
True,
marks=[td.skip_if_np_lt("1.15")],
),
pytest.param(
np.all,
{"A": pd.Series([1, 2], dtype="M8[ns]")},
True,
marks=[td.skip_if_np_lt("1.15")],
),
pytest.param(
np.any,
{"A": pd.Series([1, 2], dtype="M8[ns]")},
True,
marks=[td.skip_if_np_lt("1.15")],
),
pytest.param(
np.all,
{"A": pd.Series([0, 1], dtype="m8[ns]")},
False,
marks=[td.skip_if_np_lt("1.15")],
),
pytest.param(
np.any,
{"A": pd.Series([0, 1], dtype="m8[ns]")},
True,
marks=[td.skip_if_np_lt("1.15")],
),
pytest.param(
np.all,
{"A": pd.Series([1, 2], dtype="m8[ns]")},
True,
marks=[td.skip_if_np_lt("1.15")],
),
pytest.param(
np.any,
{"A": pd.Series([1, 2], dtype="m8[ns]")},
True,
marks=[td.skip_if_np_lt("1.15")],
),
pytest.param(np.all, {"A": pd.Series([0, 1], dtype="M8[ns]")}, False,),
pytest.param(np.any, {"A": pd.Series([0, 1], dtype="M8[ns]")}, True,),
pytest.param(np.all, {"A": pd.Series([1, 2], dtype="M8[ns]")}, True,),
pytest.param(np.any, {"A": pd.Series([1, 2], dtype="M8[ns]")}, True,),
pytest.param(np.all, {"A": pd.Series([0, 1], dtype="m8[ns]")}, False,),
pytest.param(np.any, {"A": pd.Series([0, 1], dtype="m8[ns]")}, True,),
pytest.param(np.all, {"A": pd.Series([1, 2], dtype="m8[ns]")}, True,),
pytest.param(np.any, {"A": pd.Series([1, 2], dtype="m8[ns]")}, True,),
(np.all, {"A": pd.Series([0, 1], dtype="category")}, False),
(np.any, {"A": pd.Series([0, 1], dtype="category")}, True),
(np.all, {"A": pd.Series([1, 2], dtype="category")}, True),
Expand All @@ -1120,8 +1080,6 @@ def test_any_all_bool_only(self):
"B": pd.Series([10, 20], dtype="m8[ns]"),
},
True,
# In 1.13.3 and 1.14 np.all(df) returns a Timedelta here
marks=[td.skip_if_np_lt("1.15")],
),
],
)
Expand Down
4 changes: 0 additions & 4 deletions pandas/tests/io/formats/test_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@


class TestToCSV:
@pytest.mark.xfail(
(3, 6, 5) > sys.version_info,
reason=("Python csv library bug (see https://bugs.python.org/issue32255)"),
)
def test_to_csv_with_single_column(self):
# see gh-18676, https://bugs.python.org/issue32255
#
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/series/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import numpy as np
import pytest

import pandas.util._test_decorators as td

import pandas as pd
from pandas import DataFrame, Series
import pandas._testing as tm
Expand Down Expand Up @@ -130,7 +128,6 @@ def test_is_monotonic(self):

@pytest.mark.parametrize("func", [np.any, np.all])
@pytest.mark.parametrize("kwargs", [dict(keepdims=True), dict(out=object())])
@td.skip_if_np_lt("1.15")
def test_validate_any_all_out_keepdims_raises(self, kwargs, func):
s = pd.Series([1, 2])
param = list(kwargs)[0]
Expand All @@ -144,7 +141,6 @@ def test_validate_any_all_out_keepdims_raises(self, kwargs, func):
with pytest.raises(ValueError, match=msg):
func(s, **kwargs)

@td.skip_if_np_lt("1.15")
def test_validate_sum_initial(self):
s = pd.Series([1, 2])
msg = (
Expand All @@ -167,7 +163,6 @@ def test_validate_median_initial(self):
# method instead of the ufunc.
s.median(overwrite_input=True)

@td.skip_if_np_lt("1.15")
def test_validate_stat_keepdims(self):
s = pd.Series([1, 2])
msg = (
Expand Down