Skip to content

Commit 831d29d

Browse files
authored
TST: Mark more tests as pytest.mark.slow (#62407)
1 parent 85e9049 commit 831d29d

File tree

19 files changed

+15
-13
lines changed

19 files changed

+15
-13
lines changed

pandas/tests/frame/indexing/test_where.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,7 @@ def test_where_nullable_invalid_na(frame_or_series, any_numeric_ea_dtype):
950950
obj.mask(mask, null)
951951

952952

953+
@pytest.mark.slow
953954
@given(data=OPTIONAL_ONE_OF_ALL)
954955
def test_where_inplace_casting(data):
955956
# GH 22051

pandas/tests/frame/test_constructors.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3247,7 +3247,6 @@ def test_from_out_of_bounds_ns_datetime(
32473247
assert item.asm8.dtype == exp_dtype
32483248
assert dtype == exp_dtype
32493249

3250-
@pytest.mark.skip_ubsan
32513250
def test_out_of_s_bounds_datetime64(self, constructor):
32523251
scalar = np.datetime64(np.iinfo(np.int64).max, "D")
32533252
result = constructor(scalar)
@@ -3283,7 +3282,6 @@ def test_from_out_of_bounds_ns_timedelta(
32833282
assert item.asm8.dtype == exp_dtype
32843283
assert dtype == exp_dtype
32853284

3286-
@pytest.mark.skip_ubsan
32873285
@pytest.mark.parametrize("cls", [np.datetime64, np.timedelta64])
32883286
def test_out_of_s_bounds_timedelta64(self, constructor, cls):
32893287
scalar = cls(np.iinfo(np.int64).max, "D")

pandas/tests/groupby/test_cumulative.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def test_groupby_cumprod():
6060
tm.assert_series_equal(actual, expected)
6161

6262

63-
@pytest.mark.skip_ubsan
6463
def test_groupby_cumprod_overflow():
6564
# GH#37493 if we overflow we return garbage consistent with numpy
6665
df = DataFrame({"key": ["b"] * 4, "value": 100_000})

pandas/tests/indexes/ranges/test_setops.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ def assert_range_or_not_is_rangelike(index):
459459
assert not (diff == diff[0]).all()
460460

461461

462+
@pytest.mark.slow
462463
@given(
463464
st.integers(-20, 20),
464465
st.integers(-20, 20),

pandas/tests/io/parser/common/test_float.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_scientific_no_exponent(all_parsers_all_precisions):
4646
[
4747
-617,
4848
-100000,
49-
pytest.param(-99999999999999999, marks=pytest.mark.skip_ubsan),
49+
-99999999999999999,
5050
],
5151
)
5252
def test_very_negative_exponent(all_parsers_all_precisions, neg_exp):
@@ -59,7 +59,6 @@ def test_very_negative_exponent(all_parsers_all_precisions, neg_exp):
5959
tm.assert_frame_equal(result, expected)
6060

6161

62-
@pytest.mark.skip_ubsan
6362
@xfail_pyarrow # AssertionError: Attributes of DataFrame.iloc[:, 0] are different
6463
@pytest.mark.parametrize("exp", [999999999999999999, -999999999999999999])
6564
def test_too_many_exponent_digits(all_parsers_all_precisions, exp, request):

pandas/tests/io/sas/test_byteswap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import pandas._testing as tm
1919

2020

21+
@pytest.mark.slow
2122
@given(read_offset=st.integers(0, 11), number=st.integers(min_value=0))
2223
@example(number=2**16, read_offset=0)
2324
@example(number=2**32, read_offset=0)
@@ -29,6 +30,7 @@ def test_int_byteswap(read_offset, number, int_type, should_byteswap):
2930
_test(number, int_type, read_offset, should_byteswap)
3031

3132

33+
@pytest.mark.slow
3234
@pytest.mark.filterwarnings("ignore:overflow encountered:RuntimeWarning")
3335
@given(read_offset=st.integers(0, 11), number=st.floats())
3436
@pytest.mark.parametrize("float_type", [np.float32, np.float64])

pandas/tests/scalar/timedelta/methods/test_round.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def test_round_invalid(self):
6363
with pytest.raises(ValueError, match=msg):
6464
t1.round(freq)
6565

66-
@pytest.mark.skip_ubsan
6766
def test_round_implementation_bounds(self):
6867
# See also: analogous test for Timestamp
6968
# GH#38964
@@ -89,7 +88,7 @@ def test_round_implementation_bounds(self):
8988
with pytest.raises(OutOfBoundsTimedelta, match=msg):
9089
Timedelta.max.round("s")
9190

92-
@pytest.mark.skip_ubsan
91+
@pytest.mark.slow
9392
@given(val=st.integers(min_value=iNaT + 1, max_value=lib.i8max))
9493
@pytest.mark.parametrize(
9594
"method", [Timedelta.round, Timedelta.floor, Timedelta.ceil]

pandas/tests/scalar/timedelta/test_arithmetic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,6 @@ def test_td_op_timedelta_timedeltalike_array(self, op, arr):
969969

970970

971971
class TestTimedeltaComparison:
972-
@pytest.mark.skip_ubsan
973972
def test_compare_pytimedelta_bounds(self):
974973
# GH#49021 don't overflow on comparison with very large pytimedeltas
975974

pandas/tests/scalar/timedelta/test_timedelta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def test_timedelta_hash_equality(self):
587587
ns_td = Timedelta(1, "ns")
588588
assert hash(ns_td) != hash(ns_td.to_pytimedelta())
589589

590-
@pytest.mark.skip_ubsan
590+
@pytest.mark.slow
591591
@pytest.mark.xfail(
592592
reason="pd.Timedelta violates the Python hash invariant (GH#44504).",
593593
)

pandas/tests/scalar/timestamp/methods/test_round.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ def test_round_implementation_bounds(self):
288288
with pytest.raises(OutOfBoundsDatetime, match=msg):
289289
Timestamp.max.round("s")
290290

291+
@pytest.mark.slow
291292
@given(val=st.integers(iNaT + 1, lib.i8max))
292293
@pytest.mark.parametrize(
293294
"method", [Timestamp.round, Timestamp.floor, Timestamp.ceil]

0 commit comments

Comments
 (0)