From f536fcfc362a5836176ea90e81d1ca4c76e517e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Van=C4=9Bk?= Date: Tue, 12 Jul 2022 22:07:13 +0200 Subject: [PATCH] dev-python/pymacaroons: enable tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This enables majority of available tests except of those depending on too old dev-python/hypothesis version. Signed-off-by: Petr Vaněk Closes: https://github.com/gentoo/gentoo/pull/26375 Signed-off-by: Sam James --- dev-python/pymacaroons/pymacaroons-0.13.0.ebuild | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/dev-python/pymacaroons/pymacaroons-0.13.0.ebuild b/dev-python/pymacaroons/pymacaroons-0.13.0.ebuild index 24e60796d20ce..fc5b6826c9b41 100644 --- a/dev-python/pymacaroons/pymacaroons-0.13.0.ebuild +++ b/dev-python/pymacaroons/pymacaroons-0.13.0.ebuild @@ -18,12 +18,22 @@ SRC_URI="https://github.com/ecordell/pymacaroons/archive/v${PV}.tar.gz -> ${P}.g LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" +IUSE="test" -# tests are incompatible with dev-python/hypothesis::gentoo. This package needs -# <2.0.0, because needed hypothesis.specifiers module was removed in 2.0.0. -RESTRICT="test" +RESTRICT="!test? ( test )" RDEPEND=" dev-python/pynacl[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}] " +BDEPEND="test? ( + dev-python/mock[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + ) +" + +python_test() { + # The package also contains property_tests, however, they are incompatible + # with dev-python/hypothesis in gentoo. The package requires too old version. + "${EPYTHON}" -m nose -v tests/functional_tests || die "Tests failed with ${EPYTHON}" +}