commit: df8f9663ac22f45f4bfe7cf82f481b80ff23f66f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 2 08:43:42 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 9 21:55:35 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df8f9663
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 <AT> gentoo.org>
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 d0bfb781905..03251a77e40 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}"