Skip to content

Commit

Permalink
Skip all hypothesis health checks by default in CI runs.
Browse files Browse the repository at this point in the history
To avoid non-deterministic sporadic failures.
  • Loading branch information
csadorf committed Dec 15, 2022
1 parent cbfc1ba commit c5d256f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/cuml/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,22 @@
# Add the import here for any plugins that should be loaded EVERY TIME
pytest_plugins = ("cuml.testing.plugins.quick_run_plugin")

CI = os.environ.get("CI") in ("true", "1")


# Configure hypothesis profiles

HEALTH_CHECKS_SUPPRESSED_BY_DEFAULT = \
hypothesis.HealthCheck.all() if CI else [
hypothesis.HealthCheck.data_too_large,
hypothesis.HealthCheck.too_slow,
]

hypothesis.settings.register_profile(
name="unit",
parent=hypothesis.settings.get_profile("default"),
max_examples=20,
suppress_health_check=[
hypothesis.HealthCheck.data_too_large,
],
suppress_health_check=HEALTH_CHECKS_SUPPRESSED_BY_DEFAULT,
)

hypothesis.settings.register_profile(
Expand Down

0 comments on commit c5d256f

Please sign in to comment.