summaryrefslogtreecommitdiff
path: root/eclass/python-utils-r1.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index dce565b8b036..9e94acf34edf 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1518,6 +1518,17 @@ epytest() {
fi
fi
+ # If we are using hypothesis (require use via EPYTEST_PLUGINS, since
+ # ebuilds may disable autoloading manually) *and* hypothesis-gentoo
+ # is available, use it to disable all health checks, to prevent the tests
+ # from failing randomly under load.
+ if has hypothesis "${EPYTEST_PLUGINS[@]}" &&
+ "${EPYTHON}" -c 'import hypothesis_gentoo' 2>/dev/null &&
+ [[ ! ${HYPOTHESIS_NO_PLUGINS} ]]
+ then
+ args+=( --hypothesis-profile=gentoo )
+ fi
+
local x
for x in "${EPYTEST_DESELECT[@]}"; do
args+=( --deselect "${x}" )