Skip to content
Snippets Groups Projects
Unverified Commit 8b3db717 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone Committed by GitHub
Browse files

Merge pull request #26 from PrivateStorageio/25.hypothesis-config

Create a `ci` profile and select it.

Fixes: #25 
parents ab6cea65 65f89353
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ jobs:
environment:
PIP_SYNC_REQUIREMENTS: "requirements.txt requirements-tests.txt"
ZKAPAUTHORIZER_HYPOTHESIS_PROFILE: "ci"
steps:
- "checkout"
......
......@@ -15,3 +15,34 @@
"""
The automated unit test suite.
"""
def _configure_hypothesis():
"""
Select define Hypothesis profiles and select one based on environment
variables.
"""
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("ZKAPAUTHORIZER_HYPOTHESIS_PROFILE", "default")
settings.load_profile(profile_name)
_configure_hypothesis()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment