python-utils-r1.eclass: Pass -Wdefault to epytest to avoid -Werror

Make pytest pass -Wdefault in order to override upstream default warning
options that commonly include -Werror.  This has often caused tests to
start failing due to new deprecation warnings introduced
in dependencies, or block new implementations due to harmless
deprecation warnings.

A side effect of this is that we are overriding all warning options used
by upstream.  This could e.g. cause more warnings to be reported (when
upstream ignores some of them).  This might also break badly written
tests (e.g. when they rely on exceptions to catch warnings).

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2021-07-02 10:25:40 +02:00
parent bb49af09c8
commit 7ae1b4b192
+3
View File
@@ -1264,6 +1264,9 @@ epytest() {
-ra
# print local variables in tracebacks, useful for debugging
-l
# override filterwarnings=error, we do not really want -Werror
# for end users, as it tends to fail on new warnings from deps
-Wdefault
)
set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}"