From f7d081fd3c6a27bb692fc3497cb2e368cdfd0d2f Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 12 Oct 2020 16:22:04 +0100 Subject: [PATCH 1/3] Revert "Backport PR #35502: CI: xfail numpy-dev (#35537)" This reverts commit 69165d12644768c7a22b7ae798e34ca6ce4f28e1. --- pandas/tests/indexes/common.py | 12 +----------- pandas/tests/indexing/test_loc.py | 3 --- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/pandas/tests/indexes/common.py b/pandas/tests/indexes/common.py index 5f82203d92dc3..1cb539f6010fd 100644 --- a/pandas/tests/indexes/common.py +++ b/pandas/tests/indexes/common.py @@ -5,7 +5,6 @@ import pytest from pandas._libs import iNaT -from pandas.compat.numpy import _is_numpy_dev from pandas.errors import InvalidIndexError from pandas.core.dtypes.common import is_datetime64tz_dtype @@ -418,7 +417,7 @@ def test_set_ops_error_cases(self, case, method, index): with pytest.raises(TypeError, match=msg): getattr(index, method)(case) - def test_intersection_base(self, index, request): + def test_intersection_base(self, index): if isinstance(index, CategoricalIndex): return @@ -435,15 +434,6 @@ def test_intersection_base(self, index, request): # GH 10149 cases = [klass(second.values) for klass in [np.array, Series, list]] for case in cases: - # https://github.com/pandas-dev/pandas/issues/35481 - if ( - _is_numpy_dev - and isinstance(case, Series) - and isinstance(index, UInt64Index) - ): - mark = pytest.mark.xfail(reason="gh-35481") - request.node.add_marker(mark) - result = first.intersection(case) assert tm.equalContents(result, second) diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py index 193800fae751f..30b13b6ea9fce 100644 --- a/pandas/tests/indexing/test_loc.py +++ b/pandas/tests/indexing/test_loc.py @@ -5,8 +5,6 @@ import numpy as np import pytest -from pandas.compat.numpy import _is_numpy_dev - import pandas as pd from pandas import DataFrame, Series, Timestamp, date_range import pandas._testing as tm @@ -947,7 +945,6 @@ def test_loc_setitem_empty_append(self): df.loc[0, "x"] = expected.loc[0, "x"] tm.assert_frame_equal(df, expected) - @pytest.mark.xfail(_is_numpy_dev, reason="gh-35481") def test_loc_setitem_empty_append_raises(self): # GH6173, various appends to an empty dataframe From e6ad6334eabd0511bf100d55a1575f7b8e4d47c0 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 12 Oct 2020 19:37:56 +0100 Subject: [PATCH 2/3] empty commit From e98a4b1afeedf9192be7dec8ee48060dcdfba26c Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Wed, 14 Oct 2020 18:31:29 +0100 Subject: [PATCH 3/3] xfail test_loc_setitem_empty_append_raises --- pandas/tests/indexing/test_loc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py index 30b13b6ea9fce..193800fae751f 100644 --- a/pandas/tests/indexing/test_loc.py +++ b/pandas/tests/indexing/test_loc.py @@ -5,6 +5,8 @@ import numpy as np import pytest +from pandas.compat.numpy import _is_numpy_dev + import pandas as pd from pandas import DataFrame, Series, Timestamp, date_range import pandas._testing as tm @@ -945,6 +947,7 @@ def test_loc_setitem_empty_append(self): df.loc[0, "x"] = expected.loc[0, "x"] tm.assert_frame_equal(df, expected) + @pytest.mark.xfail(_is_numpy_dev, reason="gh-35481") def test_loc_setitem_empty_append_raises(self): # GH6173, various appends to an empty dataframe