Add '-l' to epytest, in order to improve tracebacks by including the values of local variables.
Signed-off-by: Michał Górny <[email protected]> --- eclass/python-utils-r1.eclass | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index d0bfb7819059..03251a77e40c 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -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}" -- 2.31.1
