Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZKAPAuthorizer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
ZKAPAuthorizer
Commits
8b3db717
Unverified
Commit
8b3db717
authored
5 years ago
by
Jean-Paul Calderone
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #26 from PrivateStorageio/25.hypothesis-config
Create a `ci` profile and select it. Fixes:
#25
parents
ab6cea65
65f89353
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.circleci/config.yml
+1
-0
1 addition, 0 deletions
.circleci/config.yml
src/_zkapauthorizer/tests/__init__.py
+31
-0
31 additions, 0 deletions
src/_zkapauthorizer/tests/__init__.py
with
32 additions
and
0 deletions
.circleci/config.yml
+
1
−
0
View file @
8b3db717
...
@@ -53,6 +53,7 @@ jobs:
...
@@ -53,6 +53,7 @@ jobs:
environment
:
environment
:
PIP_SYNC_REQUIREMENTS
:
"
requirements.txt
requirements-tests.txt"
PIP_SYNC_REQUIREMENTS
:
"
requirements.txt
requirements-tests.txt"
ZKAPAUTHORIZER_HYPOTHESIS_PROFILE
:
"
ci"
steps
:
steps
:
-
"
checkout"
-
"
checkout"
...
...
This diff is collapsed.
Click to expand it.
src/_zkapauthorizer/tests/__init__.py
+
31
−
0
View file @
8b3db717
...
@@ -15,3 +15,34 @@
...
@@ -15,3 +15,34 @@
"""
"""
The automated unit test suite.
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
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment