Skip to content

Commit 69b4716

Browse files
committed
More skips
1 parent 88bf2bf commit 69b4716

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

pandas/tests/arrays/string_/test_string.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
from pandas._config import using_string_dtype
1212

13+
from pandas.compat import IS_FREE_THREADING
14+
from pandas.compat.numpy import np_version_gt2p2
1315
from pandas.compat.pyarrow import pa_version_under12p0
1416

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

142144

145+
@pytest.mark.skipif(
146+
IS_FREE_THREADING and np_version_gt2p2,
147+
reason="Segfaults in TimedeltaArray._format_native_types",
148+
)
143149
def test_astype_roundtrip(dtype):
144150
ser = pd.Series(pd.date_range("2000", periods=12))
145151
ser[0] = None

pandas/tests/copy_view/test_replace.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def test_replace_regex_inplace_refs():
6363
tm.assert_frame_equal(view, df_orig)
6464

6565

66+
@pytest.mark.skipif(
67+
IS_FREE_THREADING and np_version_gt2p2,
68+
reason="Segfaults in array_algos.replace.replace_regex",
69+
)
6670
def test_replace_regex_inplace():
6771
df = DataFrame({"a": ["aaa", "bbb"]})
6872
arr = get_array(df, "a")

pandas/tests/series/methods/test_astype.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import pytest
1111

1212
from pandas._libs.tslibs import iNaT
13+
from pandas.compat import IS_FREE_THREADING
14+
from pandas.compat.numpy import np_version_gt2p2
1315
import pandas.util._test_decorators as td
1416

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

304+
@pytest.mark.skipif(
305+
IS_FREE_THREADING and np_version_gt2p2,
306+
reason="Segfaults in TimedeltaArray._format_native_types",
307+
)
302308
def test_astype_str_cast_td64(self):
303309
# see GH#9757
304310

@@ -493,6 +499,10 @@ def test_astype_retain_attrs(self, any_numpy_dtype):
493499

494500

495501
class TestAstypeString:
502+
@pytest.mark.skipif(
503+
IS_FREE_THREADING and np_version_gt2p2,
504+
reason="Segfaults in TimedeltaArray._format_native_types",
505+
)
496506
@pytest.mark.parametrize(
497507
"data, dtype",
498508
[

pandas/tests/series/methods/test_replace.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import numpy as np
44
import pytest
55

6+
from pandas.compat import IS_FREE_THREADING
7+
from pandas.compat.numpy import np_version_gt2p2
8+
69
import pandas as pd
710
import pandas._testing as tm
811
from pandas.core.arrays import IntervalArray
@@ -510,6 +513,10 @@ def test_replace_extension_other(self, frame_or_series):
510513
# should not have changed dtype
511514
tm.assert_equal(obj, result)
512515

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

0 commit comments

Comments
 (0)