diff --git a/dev-python/mock/mock-4.0.2.ebuild b/dev-python/mock/mock-4.0.2.ebuild index b76c0acda0b4c..d658150ed21ef 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}" }