From c5d256fc80a7549fa8c51dd91496a4616f623e07 Mon Sep 17 00:00:00 2001 From: Simon Adorf Date: Wed, 14 Dec 2022 23:59:58 -0800 Subject: [PATCH] Skip all hypothesis health checks by default in CI runs. To avoid non-deterministic sporadic failures. --- python/cuml/tests/conftest.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/python/cuml/tests/conftest.py b/python/cuml/tests/conftest.py index 686acd4d06..c5087dffee 100644 --- a/python/cuml/tests/conftest.py +++ b/python/cuml/tests/conftest.py @@ -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(