Skip to content

Commit

Permalink
Better crosshair config
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Jul 7, 2024
1 parent 9b25b7d commit 175b347
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions hypothesis-python/tests/common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import os
from warnings import filterwarnings

from hypothesis import Phase, Verbosity, settings
from hypothesis import HealthCheck, Phase, Verbosity, settings
from hypothesis._settings import not_set
from hypothesis.internal.conjecture.data import AVAILABLE_PROVIDERS
from hypothesis.internal.coverage import IN_COVERAGE_TESTS
Expand Down Expand Up @@ -61,7 +61,15 @@ def run():

settings.register_profile("debug", settings(verbosity=Verbosity.debug))

for backend in set(AVAILABLE_PROVIDERS) - {"hypothesis"}:
settings.register_profile(backend, backend=backend) # e.g. "crosshair"
if "crosshair" in AVAILABLE_PROVIDERS:
settings.register_profile(
"crosshair",
backend="crosshair",
deadline=None,
suppress_health_check=list(HealthCheck),
)

for backend in set(AVAILABLE_PROVIDERS) - {"hypothesis", "crosshair"}:
settings.register_profile(backend, backend=backend)

settings.load_profile(os.getenv("HYPOTHESIS_PROFILE", "default"))

0 comments on commit 175b347

Please sign in to comment.