Commit
79489db15fe3fc6dd7df1cd60669ab617dfbac64 changed the way tests
are run and resulted in .pytest_cache directories being installed in
site-packages/.
This will prevent those directories from being installed while still
fixing ImportMismatchError.
Bug: https://bugs.gentoo.org/661412
Package-Manager: Portage-2.3.43, Repoman-2.3.10
python_test() {
# Avoid ImportMismatchError, see https://bugs.gentoo.org/661412
- cd "${BUILD_DIR}/lib" || die
- py.test --doctest-modules more_itertools \
+ pytest --doctest-modules "${BUILD_DIR}"/lib/more_itertools \
|| die "tests fail with ${EPYTHON}"
}