summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 67dc5bf754d6..9eb068d3b13f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1318,6 +1318,11 @@ epytest() {
# remove common temporary directories left over by pytest plugins
rm -rf .hypothesis .pytest_cache || die
+ # pytest plugins create additional .pyc files while testing
+ # see e.g. https://bugs.gentoo.org/847235
+ if [[ -n ${BUILD_DIR} && -d ${BUILD_DIR} ]]; then
+ find "${BUILD_DIR}" -name '*-pytest-*.pyc' -delete || die
+ fi
return ${ret}
}