summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-11-21 21:40:37 +0100
committerMichał Górny <mgorny@gentoo.org>2019-11-21 22:25:07 +0100
commitc7ac87c444c7595573a3dbd6ca460aee0f125ca4 (patch)
tree76f71ffcce6c1face093c0f6aec1b2b18f9f39f2 /dev-python/hpack
parentdev-python/hpack: Enable py3.8 (diff)
downloadgentoo-c7ac87c444c7595573a3dbd6ca460aee0f125ca4.tar.gz
gentoo-c7ac87c444c7595573a3dbd6ca460aee0f125ca4.tar.bz2
gentoo-c7ac87c444c7595573a3dbd6ca460aee0f125ca4.zip
dev-python/hpack: Disable Hypothesis health checks
Hypothesis health checks are of no use to Gentoo users, and needlessly cause tests to fail, possibly due to bugs in Hypothesis itself. Disable them. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/hpack')
-rw-r--r--dev-python/hpack/files/hpack-3.0.0-hypothesis-healthcheck.patch21
-rw-r--r--dev-python/hpack/hpack-3.0.0.ebuild4
2 files changed, 25 insertions, 0 deletions
diff --git a/dev-python/hpack/files/hpack-3.0.0-hypothesis-healthcheck.patch b/dev-python/hpack/files/hpack-3.0.0-hypothesis-healthcheck.patch
new file mode 100644
index 000000000000..aaabac3b3046
--- /dev/null
+++ b/dev-python/hpack/files/hpack-3.0.0-hypothesis-healthcheck.patch
@@ -0,0 +1,21 @@
+diff --git a/test/conftest.py b/test/conftest.py
+index f5801da..c5e3c66 100644
+--- a/test/conftest.py
++++ b/test/conftest.py
+@@ -4,11 +4,16 @@ import os
+ import json
+ import sys
+
++from hypothesis import settings, HealthCheck
+ from hypothesis.strategies import text
+
+ if sys.version_info[0] == 2:
+ from codecs import open
+
++settings.register_profile("gentoo",
++ suppress_health_check=(HealthCheck.too_slow,))
++settings.load_profile("gentoo")
++
+ # We need to grab one text example from hypothesis to prime its cache.
+ text().example()
+
diff --git a/dev-python/hpack/hpack-3.0.0.ebuild b/dev-python/hpack/hpack-3.0.0.ebuild
index 65570c88f59d..d6235dee735d 100644
--- a/dev-python/hpack/hpack-3.0.0.ebuild
+++ b/dev-python/hpack/hpack-3.0.0.ebuild
@@ -26,6 +26,10 @@ DEPEND="${RDEPEND}
)
"
+PATCHES=(
+ "${FILESDIR}"/hpack-3.0.0-hypothesis-healthcheck.patch
+)
+
python_prepare_all() {
# Remove a test that is not part of the mainstream tests
# Also, it's data directory is not included in the release