mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 22:27:17 -08:00
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:
@@ -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[@]}" "${@}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user