From f10588909c89639ce3a68ed2bcff6d7b05da1ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 23 Jan 2022 16:29:19 +0100 Subject: [PATCH] python-utils-r1.eclass: Make epytest disable plugins we don't want MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- eclass/python-utils-r1.eclass | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 85de8cb921826..3d55bc0905f23 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