Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/subprocess-tee/
Date: Thu, 16 Sep 2021 15:19:39
Message-Id: 1631805570.3ec0cde123bdf9de1a4c28b312fb2e43a9d57733.marecki@gentoo
1 commit: 3ec0cde123bdf9de1a4c28b312fb2e43a9d57733
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 16 15:18:28 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 16 15:19:30 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ec0cde1
7
8 dev-python/subprocess-tee: make it possible to run heavy tests
9
10 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
11
12 dev-python/subprocess-tee/metadata.xml | 7 +++++++
13 dev-python/subprocess-tee/subprocess-tee-0.3.4.ebuild | 12 ++++++++----
14 2 files changed, 15 insertions(+), 4 deletions(-)
15
16 diff --git a/dev-python/subprocess-tee/metadata.xml b/dev-python/subprocess-tee/metadata.xml
17 index 89509cbe280..b512ef6a117 100644
18 --- a/dev-python/subprocess-tee/metadata.xml
19 +++ b/dev-python/subprocess-tee/metadata.xml
20 @@ -10,4 +10,11 @@
21 <remote-id type="github">pycontribs/subprocess-tee</remote-id>
22 <remote-id type="pypi">subprocess-tee</remote-id>
23 </upstream>
24 + <use>
25 + <flag name="test-full">
26 + Enable full test mode. Pulls in many additional dependencies,
27 + and requires having been emerged without this flag first
28 + in order to avoid a circular dependency.
29 + </flag>
30 + </use>
31 </pkgmetadata>
32
33 diff --git a/dev-python/subprocess-tee/subprocess-tee-0.3.4.ebuild b/dev-python/subprocess-tee/subprocess-tee-0.3.4.ebuild
34 index cf66fc20271..c17411cbabe 100644
35 --- a/dev-python/subprocess-tee/subprocess-tee-0.3.4.ebuild
36 +++ b/dev-python/subprocess-tee/subprocess-tee-0.3.4.ebuild
37 @@ -14,20 +14,21 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
38 LICENSE="MIT"
39 SLOT="0"
40 KEYWORDS="~amd64"
41 +IUSE="test-full"
42
43 +REQUIRED_USE="test-full? ( test )"
44 +
45 +# ansible-molecule is invoked as an executable so no need for PYTHON_USEDEP
46 BDEPEND="dev-python/setuptools_scm[${PYTHON_USEDEP}]
47 dev-python/setuptools_scm_git_archive[${PYTHON_USEDEP}]
48 test? (
49 $(python_gen_cond_dep '
50 dev-python/enrich[${PYTHON_USEDEP}]
51 ' python3_{8,9})
52 + test-full? ( app-admin/ansible-molecule )
53 )"
54
55 distutils_enable_tests pytest
56 -# Depends on app-admin/ansible-molecule, which pulls in A LOT of other
57 -# ebuilds - including subprocess-tee itself. Too much trouble for a single
58 -# test if you ask me.
59 -EPYTEST_DESELECT=( "src/${PN/-/_}/test/test_func.py::test_molecule" )
60
61 # dev-python/{,en}rich ebuilds do not support python3_10 yet.
62 # We test fine (modulo some deprecation warnings) against 3.10 under tox, though.
63 @@ -36,5 +37,8 @@ python_test() {
64 ewarn "Skipping tests for ${EPYTHON} due to missing dependencies"
65 return 0
66 fi
67 + if ! use test-full; then
68 + local -x EPYTEST_DESELECT=( "src/${PN/-/_}/test/test_func.py::test_molecule" )
69 + fi
70 distutils-r1_python_test
71 }