python-utils-r1.eclass: Include -l in epytest

Add '-l' to epytest, in order to improve tracebacks by including
the values of local variables.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2021-04-09 23:55:35 +02:00
parent 72f3937ffa
commit df8f9663ac
+10 -1
View File
@@ -1292,7 +1292,16 @@ epytest() {
local die_args=()
[[ ${EAPI} != [45] ]] && die_args+=( -n )
set -- "${EPYTHON}" -m pytest -vv -ra "${@}"
local args=(
# verbose progress reporting and tracebacks
-vv
# list all non-passed tests in the summary for convenience
# (includes failures, skips, xfails...)
-ra
# print local variables in tracebacks, useful for debugging
-l
)
set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}"
echo "${@}" >&2
"${@}" || die "${die_args[@]}" "pytest failed with ${EPYTHON}"