Skip to content

Commit

Permalink
dev-python/mock: avoid pytest (even more)
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/759142
Package-Manager: Portage-3.0.12-prefix, Repoman-3.0.2
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Dec 8, 2020
1 parent 523ebaa commit d4b7969
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dev-python/mock/mock-4.0.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
}

Expand Down

0 comments on commit d4b7969

Please sign in to comment.