Skip to content

Commit

Permalink
apacheGH-38057: [Python][CI] Fix flaky hypothesis tests (apache#38058)
Browse files Browse the repository at this point in the history
### Rationale for this change

Some hypothesis tests are consistently flaky due to taking too long to generate examples. "Too long" is ~2 seconds so let's just suppress the warnings. It is suppressed only for a small number of tests.

### What changes are included in this PR?

* Suppress hypothesis warnings for test data generation being too slow (> 2 seconds).

### Are these changes tested?

Will test the hypothesis CI job here.

### Are there any user-facing changes?

No
* Closes: apache#38057

Authored-by: Dane Pitkin <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
danepitkin authored and dgreiss committed Feb 17, 2024
1 parent ab7c2ac commit 8736ad2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/pyarrow/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,7 @@ def test_array_pickle_dictionary(pickle_module):
assert array.equals(result)


@h.settings(suppress_health_check=(h.HealthCheck.too_slow,))
@h.given(
past.arrays(
past.all_types,
Expand Down
1 change: 1 addition & 0 deletions python/pyarrow/tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,7 @@ def test_is_boolean_value():
assert pa.types.is_boolean_value(np.bool_(False))


@h.settings(suppress_health_check=(h.HealthCheck.too_slow,))
@h.given(
past.all_types |
past.all_fields |
Expand Down

0 comments on commit 8736ad2

Please sign in to comment.