Skip to content

Commit

Permalink
Backport PR pandas-dev#45910: TST/CI: Set hypothesis deadline to None…
Browse files Browse the repository at this point in the history
… to avoid flaky failures
  • Loading branch information
mroeschke authored and meeseeksmachine committed Feb 10, 2022
1 parent b1e9a91 commit b250d02
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
4 changes: 3 additions & 1 deletion pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def pytest_collection_modifyitems(items, config):
# is too short for a specific test, (a) try to make it faster, and (b)
# if it really is slow add `@settings(deadline=...)` with a working value,
# or `deadline=None` to entirely disable timeouts for that test.
deadline=500,
# 2022-02-09: Changed deadline from 500 -> None. Deadline leads to
# non-actionable, flaky CI failures (# GH 24641, 44969, 45118, 44969)
deadline=None,
suppress_health_check=(hypothesis.HealthCheck.too_slow,),
)
hypothesis.settings.load_profile("ci")
Expand Down
6 changes: 1 addition & 5 deletions pandas/tests/frame/indexing/test_where.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from datetime import datetime

from hypothesis import (
given,
settings,
)
from hypothesis import given
import numpy as np
import pytest

Expand Down Expand Up @@ -924,7 +921,6 @@ def test_where_nullable_invalid_na(frame_or_series, any_numeric_ea_dtype):


@given(data=OPTIONAL_ONE_OF_ALL)
@settings(deadline=None) # GH 44969
def test_where_inplace_casting(data):
# GH 22051
df = DataFrame({"a": data})
Expand Down
6 changes: 1 addition & 5 deletions pandas/tests/io/parser/test_parse_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
import warnings

from dateutil.parser import parse as du_parse
from hypothesis import (
given,
settings,
)
from hypothesis import given
import numpy as np
import pytest
import pytz
Expand Down Expand Up @@ -1696,7 +1693,6 @@ def _helper_hypothesis_delimited_date(call, date_string, **kwargs):

@skip_pyarrow
@given(DATETIME_NO_TZ)
@settings(deadline=None)
@pytest.mark.parametrize("delimiter", list(" -./"))
@pytest.mark.parametrize("dayfirst", [True, False])
@pytest.mark.parametrize(
Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/tseries/offsets/test_offsets_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from hypothesis import (
assume,
given,
settings,
)
import pytest
import pytz
Expand Down Expand Up @@ -46,7 +45,6 @@ def test_on_offset_implementations(dt, offset):


@given(YQM_OFFSET)
@settings(deadline=None) # GH 45118
def test_shift_across_dst(offset):
# GH#18319 check that 1) timezone is correctly normalized and
# 2) that hour is not incorrectly changed by this normalization
Expand Down
3 changes: 0 additions & 3 deletions pandas/tests/tseries/offsets/test_ticks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
assume,
example,
given,
settings,
)
import numpy as np
import pytest
Expand Down Expand Up @@ -62,7 +61,6 @@ def test_delta_to_tick():


@pytest.mark.parametrize("cls", tick_classes)
@settings(deadline=None) # GH 24641
@example(n=2, m=3)
@example(n=800, m=300)
@example(n=1000, m=5)
Expand All @@ -84,7 +82,6 @@ def test_tick_add_sub(cls, n, m):

@pytest.mark.arm_slow
@pytest.mark.parametrize("cls", tick_classes)
@settings(deadline=None)
@example(n=2, m=3)
@given(n=INT_NEG_999_TO_POS_999, m=INT_NEG_999_TO_POS_999)
def test_tick_equality(cls, n, m):
Expand Down

0 comments on commit b250d02

Please sign in to comment.