summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-01-23 16:29:19 +0100
committerMichał Górny <mgorny@gentoo.org>2022-01-24 23:09:43 +0100
commitf10588909c89639ce3a68ed2bcff6d7b05da1ba8 (patch)
tree82244c429d872f897d24a9200d2a0454d48783b6 /eclass
parentdev-python/pytest-flakes: Enables pytest plugin explicitly (diff)
downloadgentoo-f10588909c89639ce3a68ed2bcff6d7b05da1ba8.tar.gz
gentoo-f10588909c89639ce3a68ed2bcff6d7b05da1ba8.tar.bz2
gentoo-f10588909c89639ce3a68ed2bcff6d7b05da1ba8.zip
python-utils-r1.eclass: Make epytest disable plugins we don't want
Make epytest explicitly disable unwanted plugins such as pytest-cov or pytest-flakes. We want the relevant options to be stripped out of pytest config files. However, when these packages are installed on the system, it's easy to miss them and then users (or tinderboxes) hit the failures first. Disabling the plugins explicitly forces them to fail immediately while testing. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-utils-r1.eclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 85de8cb92182..3d55bc0905f2 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1321,6 +1321,14 @@ epytest() {
-Wdefault
# override color output
"--color=${color}"
+ # disable the undesirable-dependency plugins by default to
+ # trigger missing argument strips. strip options that require
+ # them from config files. enable them explicitly via "-p ..."
+ # if you *really* need them.
+ -p no:cov
+ -p no:flake8
+ -p no:flakes
+ -p no:pylint
)
local x
for x in "${EPYTEST_DESELECT[@]}"; do