summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-04-02 10:43:42 +0200
committerMichał Górny <mgorny@gentoo.org>2021-04-09 23:55:35 +0200
commitdf8f9663ac22f45f4bfe7cf82f481b80ff23f66f (patch)
tree6c65093e19e8b89429703c6fb9c31b0144cca6fa
parentgames-server/pvpgn: fix MissingSlotDep for postgresql (diff)
downloadgentoo-df8f9663ac22f45f4bfe7cf82f481b80ff23f66f.tar.gz
gentoo-df8f9663ac22f45f4bfe7cf82f481b80ff23f66f.tar.bz2
gentoo-df8f9663ac22f45f4bfe7cf82f481b80ff23f66f.zip
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>
-rw-r--r--eclass/python-utils-r1.eclass11
1 files changed, 10 insertions, 1 deletions
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}"