From 27dbf98f57220fb9630c543baa4c3170301ff643 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Thu, 5 Mar 2020 14:05:42 -0500
Subject: [PATCH] Make the default profile disable too_slow and the deadline

---
 src/_zkapauthorizer/tests/__init__.py | 28 +++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/src/_zkapauthorizer/tests/__init__.py b/src/_zkapauthorizer/tests/__init__.py
index 1fd9a9d..8414036 100644
--- a/src/_zkapauthorizer/tests/__init__.py
+++ b/src/_zkapauthorizer/tests/__init__.py
@@ -28,24 +28,36 @@ def _configure_hypothesis():
         settings,
     )
 
-    settings.register_profile(
-        "ci",
+    base = dict(
         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.
+            # CPU resources available to 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,
     )
 
+    settings.register_profile(
+        "default",
+        **base
+    )
+
+    settings.register_profile(
+        "ci",
+        # Make CI runs a little more aggressive in amount of coverage they try
+        # to provide.
+        max_examples=1000,
+        **base
+    )
+
     settings.register_profile(
         "big",
         max_examples=10000,
-        deadline=None,
+        **base
     )
 
     profile_name = environ.get("ZKAPAUTHORIZER_HYPOTHESIS_PROFILE", "default")
-- 
GitLab