Teach it about a CI profile

This profile does not have time-based warnings.
This commit is contained in:
Jean-Paul Calderone 2018-04-03 13:11:58 -04:00
parent da2e4a80cd
commit f6f617c33c

View File

@ -25,6 +25,34 @@ def disable_foolscap_incidents():
# we disable incident reporting for all unit tests.
disable_foolscap_incidents()
def _configure_hypothesis():
from os import environ
from hypothesis import (
HealthCheck,
settings,
)
settings.register_profile(
"ci",
suppress_health_check=[
# CPU resources available to CI builds typically varies
# significantly from run to run making it difficult to determine
# if "too slow" data generation is a result of the code or the
# execution environment. Prevent these checks from
# (intermittently) failing tests that are otherwise fine.
HealthCheck.too_slow,
],
# With the same reasoning, disable the test deadline.
deadline=None,
)
profile_name = environ.get("TXKUBE_HYPOTHESIS_PROFILE", "default")
settings.load_profile(profile_name)
_configure_hypothesis()
import sys
if sys.platform == "win32":
from allmydata.windows.fixups import initialize