summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/mock')
-rw-r--r--dev-python/mock/mock-4.0.2.ebuild8
1 files changed, 8 insertions, 0 deletions
diff --git a/dev-python/mock/mock-4.0.2.ebuild b/dev-python/mock/mock-4.0.2.ebuild
index b76c0acda0b4..d658150ed21e 100644
--- a/dev-python/mock/mock-4.0.2.ebuild
+++ b/dev-python/mock/mock-4.0.2.ebuild
@@ -23,6 +23,11 @@ RDEPEND="
DEPEND="${RDEPEND}
>=dev-python/setuptools-17.1[${PYTHON_USEDEP}]"
+src_prepare() {
+ sed -i -e '/ pytest.*/d' setup.cfg || die
+ distutils-r1_src_prepare
+}
+
python_test() {
# Upstream supports running tests only in their dream pristine
# environment. pytest doesn't work at all if mock is already
@@ -40,6 +45,9 @@ python_test() {
mock/tests/testmock.py || die
fi
+ # Avoid pytest dependency
+ sed -i -e '/import pytest/d' mock/tests/testhelpers.py || die
+
"${EPYTHON}" -m unittest discover -v || die "Tests failed with ${EPYTHON}"
}