From 3e9a6aca35dcf825d1794c86108c59420f4da41a Mon Sep 17 00:00:00 2001 From: Zero Date: Sun, 30 Oct 2022 09:34:42 +0800 Subject: [PATCH 1/5] fix `hypothesis.errors.FailedHealthCheck` --- tests/functions/test_case_when.py | 1 + tests/functions/test_encode_categorical.py | 1 + tests/functions/test_expand_grid.py | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/functions/test_case_when.py b/tests/functions/test_case_when.py index 8971f4e31..704034067 100644 --- a/tests/functions/test_case_when.py +++ b/tests/functions/test_case_when.py @@ -201,6 +201,7 @@ def test_case_when_default_list_like(df): @given(df=categoricaldf_strategy()) +@settings(deadline=None) def test_case_when_default_index(df): """ Test case_when for scenarios where `default` is an index. diff --git a/tests/functions/test_encode_categorical.py b/tests/functions/test_encode_categorical.py index fd4d6eeb7..fb77872c4 100644 --- a/tests/functions/test_encode_categorical.py +++ b/tests/functions/test_encode_categorical.py @@ -234,6 +234,7 @@ def test_empty_col_sort(df): @pytest.mark.functions @given(df=df_strategy()) +@settings(deadline=None) def test_empty_col_appearance(df): """ Raise ValueError if a string is provided, diff --git a/tests/functions/test_expand_grid.py b/tests/functions/test_expand_grid.py index 492958306..444c03801 100644 --- a/tests/functions/test_expand_grid.py +++ b/tests/functions/test_expand_grid.py @@ -13,6 +13,7 @@ @given(df=df_strategy()) +@settings(deadline=None) def test_others_not_dict(df): """Raise Error if `others` is not a dictionary.""" with pytest.raises(TypeError): From eee41f831ce766e839063a87f785c848e74513a0 Mon Sep 17 00:00:00 2001 From: Zero Date: Sun, 30 Oct 2022 10:04:11 +0800 Subject: [PATCH 2/5] fix `hypothesis.errors.FailedHealthCheck` --- tests/functions/test_case_when.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functions/test_case_when.py b/tests/functions/test_case_when.py index 704034067..048b50a3f 100644 --- a/tests/functions/test_case_when.py +++ b/tests/functions/test_case_when.py @@ -166,6 +166,7 @@ def test_case_when_replacement_callable(df): @given(df=categoricaldf_strategy()) +@settings(deadline=None) def test_case_when_default_array(df): """ Test case_when for scenarios where `default` is array-like From 2f0bfc80d1bffe9addde403d1abcf275342d1714 Mon Sep 17 00:00:00 2001 From: Zero Date: Sun, 30 Oct 2022 14:15:40 +0800 Subject: [PATCH 3/5] fix `hypothesis.errors.FailedHealthCheck` --- tests/functions/test_case_when.py | 1 + tests/functions/test_encode_categorical.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/functions/test_case_when.py b/tests/functions/test_case_when.py index 048b50a3f..aa7b2e516 100644 --- a/tests/functions/test_case_when.py +++ b/tests/functions/test_case_when.py @@ -184,6 +184,7 @@ def test_case_when_default_array(df): @given(df=categoricaldf_strategy()) +@settings(deadline=None) def test_case_when_default_list_like(df): """ Test case_when for scenarios where `default` is list-like, diff --git a/tests/functions/test_encode_categorical.py b/tests/functions/test_encode_categorical.py index fb77872c4..ab4805bae 100644 --- a/tests/functions/test_encode_categorical.py +++ b/tests/functions/test_encode_categorical.py @@ -258,6 +258,7 @@ def test_empty_col_appearance(df): @pytest.mark.functions @given(df=categoricaldf_strategy()) +@settings(deadline=None) def test_all_None(df): """ Test output where value is None. From 1e732be7e46ce573502b6ca9c35e589cce0eded9 Mon Sep 17 00:00:00 2001 From: Zero Date: Sun, 30 Oct 2022 17:39:59 +0800 Subject: [PATCH 4/5] fix `hypothesis.errors.FailedHealthCheck` --- tests/functions/test_encode_categorical.py | 1 + tests/functions/test_expand_grid.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/functions/test_encode_categorical.py b/tests/functions/test_encode_categorical.py index ab4805bae..84ec60f95 100644 --- a/tests/functions/test_encode_categorical.py +++ b/tests/functions/test_encode_categorical.py @@ -271,6 +271,7 @@ def test_all_None(df): @pytest.mark.functions @given(df=categoricaldf_strategy()) +@settings(deadline=None) def test_all_cat_None_1(df): """ Test output where a string is provided. diff --git a/tests/functions/test_expand_grid.py b/tests/functions/test_expand_grid.py index 444c03801..f03a427f5 100644 --- a/tests/functions/test_expand_grid.py +++ b/tests/functions/test_expand_grid.py @@ -33,6 +33,7 @@ def test_others_empty(): @given(df=df_strategy()) +@settings(deadline=None) def test_df_key(df): """Raise error if df exists and df_key is not supplied.""" with pytest.raises(KeyError): From 97a5c179790b748bc97d1b550b70b44ab86740a4 Mon Sep 17 00:00:00 2001 From: Zero Date: Thu, 3 Nov 2022 09:24:16 +0800 Subject: [PATCH 5/5] fix `hypothesis.errors.FailedHealthCheck` --- tests/math/test_ecdf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/math/test_ecdf.py b/tests/math/test_ecdf.py index 03d71d159..58d3b3ea5 100644 --- a/tests/math/test_ecdf.py +++ b/tests/math/test_ecdf.py @@ -1,10 +1,12 @@ import numpy as np import pytest from hypothesis import given +from hypothesis import settings from hypothesis.extra.pandas import series @given(s=series(dtype=np.number)) +@settings(deadline=None) def test_ecdf(s): """A simple execution test.""" if s.isna().sum() > 0: