Skip to content

Commit 5bd7ac2

Browse files
phoflluckyvs1
authored andcommitted
Revert "CI: Skip numpy dev failing tests (pandas-dev#39090)" (pandas-dev#39225)
This reverts commit 3bd3d1e
1 parent 78e3968 commit 5bd7ac2

31 files changed

+5
-107
lines changed

pandas/compat/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import warnings
1313

1414
from pandas._typing import F
15-
from pandas.compat.numpy import is_numpy_dev
1615

1716
PY38 = sys.version_info >= (3, 8)
1817
PY39 = sys.version_info >= (3, 9)
@@ -119,8 +118,3 @@ def get_lzma_file(lzma):
119118
"might be required to solve this issue."
120119
)
121120
return lzma.LZMAFile
122-
123-
124-
__all__ = [
125-
"is_numpy_dev",
126-
]

pandas/tests/arithmetic/test_interval.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
from pandas.compat import is_numpy_dev
7-
86
from pandas.core.dtypes.common import is_list_like
97

108
import pandas as pd
@@ -254,7 +252,6 @@ def test_compare_length_mismatch_errors(self, op, other_constructor, length):
254252
with pytest.raises(ValueError, match="Lengths must match to compare"):
255253
op(array, other)
256254

257-
@pytest.mark.xfail(is_numpy_dev, reason="GH#39089 Numpy changed dtype inference")
258255
@pytest.mark.parametrize(
259256
"constructor, expected_type, assert_func",
260257
[

pandas/tests/base/test_misc.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44
import pytest
55

6-
from pandas.compat import IS64, PYPY, is_numpy_dev
6+
from pandas.compat import IS64, PYPY
77

88
from pandas.core.dtypes.common import is_categorical_dtype, is_object_dtype
99

@@ -116,9 +116,6 @@ def test_searchsorted(index_or_series_obj):
116116
# See gh-14833
117117
pytest.skip("np.searchsorted doesn't work on pd.MultiIndex")
118118

119-
if is_object_dtype(obj) and is_numpy_dev:
120-
pytest.skip("GH#39089 Numpy changed dtype inference")
121-
122119
max_obj = max(obj, default=0)
123120
index = np.searchsorted(obj, max_obj)
124121
assert 0 <= index <= len(obj)

pandas/tests/extension/base/methods.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
from pandas.compat import is_numpy_dev
7-
86
from pandas.core.dtypes.common import is_bool_dtype
97

108
import pandas as pd
@@ -394,9 +392,6 @@ def test_hash_pandas_object_works(self, data, as_frame):
394392
b = pd.util.hash_pandas_object(data)
395393
self.assert_equal(a, b)
396394

397-
@pytest.mark.xfail(
398-
is_numpy_dev, reason="GH#39089 Numpy changed dtype inference", strict=False
399-
)
400395
def test_searchsorted(self, data_for_sorting, as_series):
401396
b, c, a = data_for_sorting
402397
arr = data_for_sorting.take([2, 0, 1]) # to get [a, b, c]

pandas/tests/frame/apply/test_frame_apply.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import numpy as np
66
import pytest
77

8-
from pandas.compat import is_numpy_dev
9-
108
from pandas.core.dtypes.dtypes import CategoricalDtype
119

1210
import pandas as pd
@@ -592,7 +590,6 @@ def test_apply_dict(self):
592590
tm.assert_frame_equal(reduce_false, df)
593591
tm.assert_series_equal(reduce_none, dicts)
594592

595-
@pytest.mark.xfail(is_numpy_dev, reason="GH#39089 Numpy changed dtype inference")
596593
def test_applymap(self, float_frame):
597594
applied = float_frame.applymap(lambda x: x * 2)
598595
tm.assert_frame_equal(applied, float_frame * 2)

pandas/tests/frame/indexing/test_indexing.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import pytest
66

77
from pandas._libs import iNaT
8-
from pandas.compat import is_numpy_dev
98

109
from pandas.core.dtypes.common import is_integer
1110

@@ -255,8 +254,6 @@ def inc(x):
255254
)
256255
def test_setitem_same_column(self, cols, values, expected):
257256
# GH 23239
258-
if cols == ["C", "D", "D", "a"] and is_numpy_dev:
259-
pytest.skip("GH#39089 Numpy changed dtype inference")
260257
df = DataFrame([values], columns=cols)
261258
df["a"] = df["a"]
262259
result = df["a"].values[0]

pandas/tests/frame/methods/test_drop.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
from pandas.compat import is_numpy_dev
76
from pandas.errors import PerformanceWarning
87
import pandas.util._test_decorators as td
98

@@ -109,7 +108,6 @@ def test_drop_names(self):
109108
expected = Index(["a", "b", "c"], name="first")
110109
tm.assert_index_equal(dropped.index, expected)
111110

112-
@pytest.mark.xfail(is_numpy_dev, reason="GH#39089 Numpy changed dtype inference")
113111
def test_drop(self):
114112
simple = DataFrame({"A": [1, 2, 3, 4], "B": [0, 1, 2, 3]})
115113
tm.assert_frame_equal(simple.drop("A", axis=1), simple[["B"]])

pandas/tests/frame/methods/test_isin.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import numpy as np
22
import pytest
33

4-
from pandas.compat import is_numpy_dev
5-
64
import pandas as pd
75
from pandas import DataFrame, MultiIndex, Series
86
import pandas._testing as tm
@@ -34,7 +32,6 @@ def test_isin_empty(self, empty):
3432
result = df.isin(empty)
3533
tm.assert_frame_equal(result, expected)
3634

37-
@pytest.mark.xfail(is_numpy_dev, reason="GH#39089 Numpy changed dtype inference")
3835
def test_isin_dict(self):
3936
df = DataFrame({"A": ["a", "b", "c"], "B": ["a", "e", "f"]})
4037
d = {"A": ["a"]}

pandas/tests/frame/methods/test_replace.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import numpy as np
77
import pytest
88

9-
from pandas.compat import is_numpy_dev
10-
119
import pandas as pd
1210
from pandas import DataFrame, Index, Series, Timestamp, date_range
1311
import pandas._testing as tm
@@ -1510,7 +1508,6 @@ def test_replace_no_replacement_dtypes(self, dtype, value):
15101508
result = df.replace(to_replace=[None, -np.inf, np.inf], value=value)
15111509
tm.assert_frame_equal(result, df)
15121510

1513-
@pytest.mark.xfail(is_numpy_dev, reason="GH#39089 Numpy changed dtype inference")
15141511
@pytest.mark.parametrize("replacement", [np.nan, 5])
15151512
def test_replace_with_duplicate_columns(self, replacement):
15161513
# GH 24798

pandas/tests/frame/methods/test_to_csv.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import numpy as np
66
import pytest
77

8-
from pandas.compat import is_numpy_dev
98
from pandas.errors import ParserError
109

1110
import pandas as pd
@@ -182,7 +181,6 @@ def test_to_csv_cols_reordering(self):
182181

183182
tm.assert_frame_equal(df[cols], rs_c, check_names=False)
184183

185-
@pytest.mark.xfail(is_numpy_dev, reason="GH#39089 Numpy changed dtype inference")
186184
def test_to_csv_new_dupe_cols(self):
187185
import pandas as pd
188186

0 commit comments

Comments
 (0)