Skip to content

Commit

Permalink
More skips
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Dec 16, 2024
1 parent 88bf2bf commit 69b4716
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pandas/tests/arrays/string_/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

from pandas._config import using_string_dtype

from pandas.compat import IS_FREE_THREADING
from pandas.compat.numpy import np_version_gt2p2
from pandas.compat.pyarrow import pa_version_under12p0

from pandas.core.dtypes.common import is_dtype_equal
Expand Down Expand Up @@ -140,6 +142,10 @@ def test_setitem_with_array_with_missing(dtype):
tm.assert_numpy_array_equal(value, value_orig)


@pytest.mark.skipif(
IS_FREE_THREADING and np_version_gt2p2,
reason="Segfaults in TimedeltaArray._format_native_types",
)
def test_astype_roundtrip(dtype):
ser = pd.Series(pd.date_range("2000", periods=12))
ser[0] = None
Expand Down
4 changes: 4 additions & 0 deletions pandas/tests/copy_view/test_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def test_replace_regex_inplace_refs():
tm.assert_frame_equal(view, df_orig)


@pytest.mark.skipif(
IS_FREE_THREADING and np_version_gt2p2,
reason="Segfaults in array_algos.replace.replace_regex",
)
def test_replace_regex_inplace():
df = DataFrame({"a": ["aaa", "bbb"]})
arr = get_array(df, "a")
Expand Down
10 changes: 10 additions & 0 deletions pandas/tests/series/methods/test_astype.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import pytest

from pandas._libs.tslibs import iNaT
from pandas.compat import IS_FREE_THREADING
from pandas.compat.numpy import np_version_gt2p2
import pandas.util._test_decorators as td

from pandas import (
Expand Down Expand Up @@ -299,6 +301,10 @@ def test_astype_str_cast_dt64(self):
expected = Series(["2010-01-04 00:00:00-05:00"], dtype="str")
tm.assert_series_equal(res, expected)

@pytest.mark.skipif(
IS_FREE_THREADING and np_version_gt2p2,
reason="Segfaults in TimedeltaArray._format_native_types",
)
def test_astype_str_cast_td64(self):
# see GH#9757

Expand Down Expand Up @@ -493,6 +499,10 @@ def test_astype_retain_attrs(self, any_numpy_dtype):


class TestAstypeString:
@pytest.mark.skipif(
IS_FREE_THREADING and np_version_gt2p2,
reason="Segfaults in TimedeltaArray._format_native_types",
)
@pytest.mark.parametrize(
"data, dtype",
[
Expand Down
7 changes: 7 additions & 0 deletions pandas/tests/series/methods/test_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import numpy as np
import pytest

from pandas.compat import IS_FREE_THREADING
from pandas.compat.numpy import np_version_gt2p2

import pandas as pd
import pandas._testing as tm
from pandas.core.arrays import IntervalArray
Expand Down Expand Up @@ -510,6 +513,10 @@ def test_replace_extension_other(self, frame_or_series):
# should not have changed dtype
tm.assert_equal(obj, result)

@pytest.mark.skipif(
IS_FREE_THREADING and np_version_gt2p2,
reason="Segfaults in array_algos.replace.compare_or_regex_search",
)
def test_replace_with_compiled_regex(self):
# https://github.com/pandas-dev/pandas/issues/35680
s = pd.Series(["a", "b", "c"])
Expand Down

0 comments on commit 69b4716

Please sign in to comment.