Skip to content
Snippets Groups Projects
Commit 239e6562 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

make hypothesis profiles work

parent 2e86c4ff
No related branches found
No related tags found
1 merge request!49Correct pass count for mutable writes
......@@ -44,10 +44,12 @@ def _configure_hypothesis():
settings.register_profile(
"big",
max_examples=100000,
max_examples=10000,
deadline=None,
)
profile_name = environ.get("ZKAPAUTHORIZER_HYPOTHESIS_PROFILE", "default")
settings.load_profile(profile_name)
print("Loaded profile {}".format(profile_name))
_configure_hypothesis()
{ buildPythonPackage, sphinx, circleci-cli
, attrs, zope_interface, twisted, tahoe-lafs, privacypass
, fixtures, testtools, hypothesis, pyflakes, treq, coverage
, hypothesisProfile ? null
, hypothesisProfile ? "default"
, collectCoverage ? false
}:
buildPythonPackage rec {
......@@ -34,10 +34,12 @@ buildPythonPackage rec {
treq
];
checkPhase = ''
runHook preCheck
"${pyflakes}/bin/pyflakes" src/_zkapauthorizer
python -m ${if collectCoverage
ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile} python -m ${if collectCoverage
then "coverage run --branch --source _zkapauthorizer,twisted.plugins.zkapauthorizer --module"
else ""
} twisted.trial _zkapauthorizer
......
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