commit:     f536fcfc362a5836176ea90e81d1ca4c76e517e5
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Tue Jul 12 20:07:13 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 01:23:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f536fcfc

dev-python/pymacaroons: enable tests

This enables majority of available tests except of those depending on
too old dev-python/hypothesis version.

Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/26375
Signed-off-by: Sam James <sam <AT> gentoo.org>

 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 24e60796d20c..fc5b6826c9b4 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}"
+}

Reply via email to