Skip to content

Commit e3df72a

Browse files
authored
Backport PR #60873: TST/CI: xfail test_frame_setitem_dask_array_into_new_col for numpy>2.1 (#60876)
1 parent f3f17cb commit e3df72a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pandas/tests/test_downstream.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
DatetimeArray,
2424
TimedeltaArray,
2525
)
26+
from pandas.util.version import Version
2627

2728

2829
@pytest.fixture
@@ -223,15 +224,22 @@ def test_missing_required_dependency():
223224
assert name in output
224225

225226

226-
def test_frame_setitem_dask_array_into_new_col():
227+
def test_frame_setitem_dask_array_into_new_col(request):
227228
# GH#47128
228229

229230
# dask sets "compute.use_numexpr" to False, so catch the current value
230231
# and ensure to reset it afterwards to avoid impacting other tests
231232
olduse = pd.get_option("compute.use_numexpr")
232233

233234
try:
235+
dask = pytest.importorskip("dask")
234236
da = pytest.importorskip("dask.array")
237+
if Version(dask.__version__) <= Version("2025.1.0") and Version(
238+
np.__version__
239+
) >= Version("2.1"):
240+
request.applymarker(
241+
pytest.mark.xfail(reason="loc.__setitem__ incorrectly mutated column c")
242+
)
235243

236244
dda = da.array([1, 2])
237245
df = DataFrame({"a": ["a", "b"]})

0 commit comments

Comments
 (0)