1 |
commit: 0c9868af0f9dbef1169657d330c4f3f23277f166 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 11 06:49:33 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 11 06:51:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c9868af |
7 |
|
8 |
dev-python/setuptools_scm: Improve test coverage |
9 |
|
10 |
Remove the silly logic attempting to selectively run tests based on USE |
11 |
flags. Instead, require complete dependency set and run all tests |
12 |
except those we explicitly can't run because of network access. |
13 |
|
14 |
.../setuptools_scm/setuptools_scm-2.1.0.ebuild | 22 ++++++++-------------- |
15 |
1 file changed, 8 insertions(+), 14 deletions(-) |
16 |
|
17 |
diff --git a/dev-python/setuptools_scm/setuptools_scm-2.1.0.ebuild b/dev-python/setuptools_scm/setuptools_scm-2.1.0.ebuild |
18 |
index a8abcb4338f..82df58170f3 100644 |
19 |
--- a/dev-python/setuptools_scm/setuptools_scm-2.1.0.ebuild |
20 |
+++ b/dev-python/setuptools_scm/setuptools_scm-2.1.0.ebuild |
21 |
@@ -14,31 +14,25 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
22 |
LICENSE="MIT" |
23 |
SLOT="0" |
24 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" |
25 |
-IUSE="git mercurial test" |
26 |
+IUSE="test" |
27 |
|
28 |
DEPEND=" |
29 |
dev-python/setuptools[${PYTHON_USEDEP}] |
30 |
- git? ( dev-vcs/git ) |
31 |
- mercurial? ( dev-vcs/mercurial ) |
32 |
- test? ( dev-python/pytest[${PYTHON_USEDEP}] )" |
33 |
+ test? ( |
34 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
35 |
+ dev-vcs/git |
36 |
+ dev-vcs/mercurial )" |
37 |
|
38 |
python_prepare_all() { |
39 |
# network access |
40 |
sed -i -e 's:test_pip_download:_&:' testing/test_regressions.py || die |
41 |
+ # all fetch specific setuptools versions |
42 |
+ rm testing/test_setuptools_support.py || die |
43 |
|
44 |
distutils-r1_python_prepare_all |
45 |
} |
46 |
|
47 |
python_test() { |
48 |
distutils_install_for_testing |
49 |
- py.test -v -v -x -k testing/test_basic_api.py || die "tests failed under ${EPYTHON}" |
50 |
- py.test -v -v -x -k testing/test_functions.py || die "tests failed under ${EPYTHON}" |
51 |
- py.test -v -v -x -k testing/test_main.py || die "tests failed under ${EPYTHON}" |
52 |
- py.test -v -v -x -k testing/test_regressions.py || die "tests failed under ${EPYTHON}" |
53 |
- if use git; then |
54 |
- py.test -v -v -x -k testing/test_git.py || die "tests failed under ${EPYTHON}" |
55 |
- fi |
56 |
- if use mercurial; then |
57 |
- py.test -v -v -x -k testing/test_mercurial.py || die "tests failed under ${EPYTHON}" |
58 |
- fi |
59 |
+ py.test -v -v -x || die "Tests fail with ${EPYTHON}" |
60 |
} |