Skip to content

Commit c5ea524

Browse files
authored
TST/CI: xfail test_frame_setitem_dask_array_into_new_col for numpy>2.1 (#60873)
1 parent 408abda commit c5ea524

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
@@ -20,6 +20,7 @@
2020
TimedeltaIndex,
2121
)
2222
import pandas._testing as tm
23+
from pandas.util.version import Version
2324

2425

2526
@pytest.fixture
@@ -222,15 +223,22 @@ def test_missing_required_dependency():
222223
assert name in output
223224

224225

225-
def test_frame_setitem_dask_array_into_new_col():
226+
def test_frame_setitem_dask_array_into_new_col(request):
226227
# GH#47128
227228

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

232233
try:
234+
dask = pytest.importorskip("dask")
233235
da = pytest.importorskip("dask.array")
236+
if Version(dask.__version__) <= Version("2025.1.0") and Version(
237+
np.__version__
238+
) >= Version("2.1"):
239+
request.applymarker(
240+
pytest.mark.xfail(reason="loc.__setitem__ incorrectly mutated column c")
241+
)
234242

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

0 commit comments

Comments
 (0)