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>
This commit is contained in:
Michał Górny
2022-01-24 23:09:43 +01:00
parent 899369c419
commit f10588909c
+8
View File
@@ -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