Skip to content

Commit

Permalink
TST: Apply skip/xfail markers for numba/dask updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Feb 4, 2025
1 parent e84a7f7 commit 2a004cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions pandas/tests/apply/test_frame_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import numpy as np
import pytest

from pandas.compat import is_platform_arm

from pandas.core.dtypes.dtypes import CategoricalDtype

import pandas as pd
Expand All @@ -16,6 +18,7 @@
)
import pandas._testing as tm
from pandas.tests.frame.common import zip_frames
from pandas.util.version import Version


@pytest.fixture
Expand Down Expand Up @@ -65,6 +68,13 @@ def test_apply(float_frame, engine, request):
@pytest.mark.parametrize("raw", [True, False])
@pytest.mark.parametrize("nopython", [True, False])
def test_apply_args(float_frame, axis, raw, engine, nopython):
numba = pytest.importorskip("numba")
if (
engine == "numba"
and Version(numba.__version__) == Version("0.61")
and is_platform_arm()
):
pytest.skip(f"Segfaults on ARM platforms with numba {numba.__version__}")
engine_kwargs = {"nopython": nopython}
result = float_frame.apply(
lambda x, y: x + y,
Expand Down
8 changes: 7 additions & 1 deletion pandas/tests/test_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
TimedeltaIndex,
)
import pandas._testing as tm
from pandas.util.version import Version


@pytest.fixture
Expand Down Expand Up @@ -222,16 +223,21 @@ def test_missing_required_dependency():
assert name in output


def test_frame_setitem_dask_array_into_new_col():
def test_frame_setitem_dask_array_into_new_col(request):
# GH#47128

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

try:
dask = pytest.importorskip("dask")
da = pytest.importorskip("dask.array")

if Version(dask.__version__) >= Version("2025.1.0"):
request.applymarker(
pytest.mark.xfail("loc.__setitem__ incorrectly mutated column c")
)
dda = da.array([1, 2])
df = DataFrame({"a": ["a", "b"]})
df["b"] = dda
Expand Down

0 comments on commit 2a004cb

Please sign in to comment.