Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 24 Jan 2022 22:14:18
Message-Id: 1643062183.f10588909c89639ce3a68ed2bcff6d7b05da1ba8.mgorny@gentoo
1 commit: f10588909c89639ce3a68ed2bcff6d7b05da1ba8
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 23 15:29:19 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 24 22:09:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1058890
7
8 python-utils-r1.eclass: Make epytest disable plugins we don't want
9
10 Make epytest explicitly disable unwanted plugins such as pytest-cov
11 or pytest-flakes. We want the relevant options to be stripped out
12 of pytest config files. However, when these packages are installed
13 on the system, it's easy to miss them and then users (or tinderboxes)
14 hit the failures first. Disabling the plugins explicitly forces
15 them to fail immediately while testing.
16
17 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
18
19 eclass/python-utils-r1.eclass | 8 ++++++++
20 1 file changed, 8 insertions(+)
21
22 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
23 index 85de8cb92182..3d55bc0905f2 100644
24 --- a/eclass/python-utils-r1.eclass
25 +++ b/eclass/python-utils-r1.eclass
26 @@ -1321,6 +1321,14 @@ epytest() {
27 -Wdefault
28 # override color output
29 "--color=${color}"
30 + # disable the undesirable-dependency plugins by default to
31 + # trigger missing argument strips. strip options that require
32 + # them from config files. enable them explicitly via "-p ..."
33 + # if you *really* need them.
34 + -p no:cov
35 + -p no:flake8
36 + -p no:flakes
37 + -p no:pylint
38 )
39 local x
40 for x in "${EPYTEST_DESELECT[@]}"; do