Skip to content

Commit 2a004cb

Browse files
committed
TST: Apply skip/xfail markers for numba/dask updates
1 parent e84a7f7 commit 2a004cb

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

pandas/tests/apply/test_frame_apply.py

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

7+
from pandas.compat import is_platform_arm
8+
79
from pandas.core.dtypes.dtypes import CategoricalDtype
810

911
import pandas as pd
@@ -16,6 +18,7 @@
1618
)
1719
import pandas._testing as tm
1820
from pandas.tests.frame.common import zip_frames
21+
from pandas.util.version import Version
1922

2023

2124
@pytest.fixture
@@ -65,6 +68,13 @@ def test_apply(float_frame, engine, request):
6568
@pytest.mark.parametrize("raw", [True, False])
6669
@pytest.mark.parametrize("nopython", [True, False])
6770
def test_apply_args(float_frame, axis, raw, engine, nopython):
71+
numba = pytest.importorskip("numba")
72+
if (
73+
engine == "numba"
74+
and Version(numba.__version__) == Version("0.61")
75+
and is_platform_arm()
76+
):
77+
pytest.skip(f"Segfaults on ARM platforms with numba {numba.__version__}")
6878
engine_kwargs = {"nopython": nopython}
6979
result = float_frame.apply(
7080
lambda x, y: x + y,

pandas/tests/test_downstream.py

Lines changed: 7 additions & 1 deletion
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,16 +223,21 @@ 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")
234236

237+
if Version(dask.__version__) >= Version("2025.1.0"):
238+
request.applymarker(
239+
pytest.mark.xfail("loc.__setitem__ incorrectly mutated column c")
240+
)
235241
dda = da.array([1, 2])
236242
df = DataFrame({"a": ["a", "b"]})
237243
df["b"] = dda

0 commit comments

Comments
 (0)