1 |
commit: b2b464f161aeadbe49288335c1b9057f31972edd |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 31 18:25:41 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 31 20:11:55 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2b464f1 |
7 |
|
8 |
dev-python/pytest-xdist: Bump to 1.34.0 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pytest-xdist/Manifest | 1 + |
13 |
.../files/pytest-xdist-1.34.0-pytest4.patch | 50 ++++++++++++++++++++++ |
14 |
dev-python/pytest-xdist/pytest-xdist-1.34.0.ebuild | 44 +++++++++++++++++++ |
15 |
3 files changed, 95 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/pytest-xdist/Manifest b/dev-python/pytest-xdist/Manifest |
18 |
index 5ce83b0cf45..76387d4b5ce 100644 |
19 |
--- a/dev-python/pytest-xdist/Manifest |
20 |
+++ b/dev-python/pytest-xdist/Manifest |
21 |
@@ -3,3 +3,4 @@ DIST pytest-xdist-1.28.0.tar.gz 61486 BLAKE2B ef8157079ea890342cd566f327588148fa |
22 |
DIST pytest-xdist-1.31.0.tar.gz 66133 BLAKE2B 79fe5f3bcad3421c1c751ffe6e09f0da42d4ff7c0016cb421ffabcab167028ec41ccfb02bbb275564cd74b13ade8d6e79bbb70b34995f3bc9000604a1533df9a SHA512 b7960d20295232b251c8ddcc5a3b9d6e7b761d577ba11c2647b4b4b410ee5c05998cf57fa57208561eb3ea7c4914db1fd446173794589d8c8e8e79ff8e0ad3aa |
23 |
DIST pytest-xdist-1.32.0.tar.gz 67733 BLAKE2B da0ce4e43dc8752e4329ddcbc13a5f55f5bc120c13f39bb01916770d2dc1864197fd91f92bc55ba27cd74b0d837ac2d310980874cdf54761339b2cd654dd6e74 SHA512 f159b4653efb4afeff4124df484670d3c672e1014712f948390b25efc53096f8237258c83a5f1a9e688c52b4a756291cb731d37fdfa800707f556550a19cb0e8 |
24 |
DIST pytest-xdist-1.33.0.tar.gz 65588 BLAKE2B 096ffa9295ec0ef4d390b714b02a4d126aa33475b55591b91375f2da0c957802e007b990dc2051d5198f223b250a4a7294367c9da8f8969313a61a7e8ef18ebd SHA512 5e5b23e60b546779d4bbcc9b86c004bdb084689ba006c8bb8a7db9be60b6080f04a5bb2b1f5b43a5062b82e35493331d1da699d8a36177307280b06aa23a1367 |
25 |
+DIST pytest-xdist-1.34.0.tar.gz 66151 BLAKE2B ac5274e32b3ef6b72113efd4300eb6946a977e0e202d3383abcdbc022126b7806edb326ddc16abb1219e22eb091e06a9c39fce3031aaf5943d4ad653a47af142 SHA512 69e9877ee0268d71d7c0ca202ccc46b3ba1a9271f0e6e4ac4b76602833f9b7012364eb6924ae994e76c1d48d63adf1702d4c5e6ed5b75c52ac7ebae958210e24 |
26 |
|
27 |
diff --git a/dev-python/pytest-xdist/files/pytest-xdist-1.34.0-pytest4.patch b/dev-python/pytest-xdist/files/pytest-xdist-1.34.0-pytest4.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..8595480c01f |
30 |
--- /dev/null |
31 |
+++ b/dev-python/pytest-xdist/files/pytest-xdist-1.34.0-pytest4.patch |
32 |
@@ -0,0 +1,50 @@ |
33 |
+From bd4e91d12bf6e20538d9b3acfe69536b3badcde5 Mon Sep 17 00:00:00 2001 |
34 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
35 |
+Date: Fri, 31 Jul 2020 20:13:24 +0200 |
36 |
+Subject: [PATCH 1/3] Fix test_config_initialization condition for pytest<5 |
37 |
+ |
38 |
+Fix test_config_initialization to be correctly skipped on pytest<5, |
39 |
+by explicitly checking pytest version (idea copied from |
40 |
+test_looponfail_removed_test). The current conditions are insufficient |
41 |
+-- the outer check wrongly assumes pytest>=5 will always be used |
42 |
+on Python 3 (which is not true if you need the same version to support |
43 |
+both Python 2 and Python 3), and the inner condition apparently |
44 |
+wrongly assuming that invocation_params attribute is not present |
45 |
+in pytest-4. |
46 |
+--- |
47 |
+ testing/acceptance_test.py | 9 +++------ |
48 |
+ 1 file changed, 3 insertions(+), 6 deletions(-) |
49 |
+ |
50 |
+diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py |
51 |
+index 7f9a551..29c5d9a 100644 |
52 |
+--- a/testing/acceptance_test.py |
53 |
++++ b/testing/acceptance_test.py |
54 |
+@@ -2,6 +2,7 @@ import os |
55 |
+ import re |
56 |
+ import sys |
57 |
+ import textwrap |
58 |
++from pkg_resources import parse_version |
59 |
+ |
60 |
+ import py |
61 |
+ import pytest |
62 |
+@@ -594,15 +595,11 @@ def test_fixture_teardown_failure(testdir): |
63 |
+ |
64 |
+ |
65 |
+ @pytest.mark.skipif( |
66 |
+- sys.version_info[:2] == (2, 7), |
67 |
+- reason="Only available in pytest 5.0+ (Python 3 only)", |
68 |
++ parse_version(pytest.__version__) < parse_version("5"), |
69 |
++ reason="Only available in pytest 5.0+", |
70 |
+ ) |
71 |
+ def test_config_initialization(testdir, monkeypatch, pytestconfig): |
72 |
+ """Ensure workers and master are initialized consistently. Integration test for #445""" |
73 |
+- if not hasattr(pytestconfig, "invocation_params"): |
74 |
+- pytest.skip( |
75 |
+- "requires pytest >=5.1 (config has no attribute 'invocation_params')" |
76 |
+- ) |
77 |
+ testdir.makepyfile( |
78 |
+ **{ |
79 |
+ "dir_a/test_foo.py": """ |
80 |
+-- |
81 |
+2.28.0 |
82 |
+ |
83 |
|
84 |
diff --git a/dev-python/pytest-xdist/pytest-xdist-1.34.0.ebuild b/dev-python/pytest-xdist/pytest-xdist-1.34.0.ebuild |
85 |
new file mode 100644 |
86 |
index 00000000000..2cc790bff70 |
87 |
--- /dev/null |
88 |
+++ b/dev-python/pytest-xdist/pytest-xdist-1.34.0.ebuild |
89 |
@@ -0,0 +1,44 @@ |
90 |
+# Copyright 1999-2020 Gentoo Authors |
91 |
+# Distributed under the terms of the GNU General Public License v2 |
92 |
+ |
93 |
+EAPI=7 |
94 |
+ |
95 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
96 |
+PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 ) |
97 |
+ |
98 |
+inherit distutils-r1 |
99 |
+ |
100 |
+DESCRIPTION="Distributed testing and loop-on-failing modes" |
101 |
+HOMEPAGE="https://pypi.org/project/pytest-xdist/ https://github.com/pytest-dev/pytest-xdist" |
102 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
103 |
+ |
104 |
+SLOT="0" |
105 |
+LICENSE="MIT" |
106 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" |
107 |
+IUSE="test" |
108 |
+RESTRICT="!test? ( test )" |
109 |
+ |
110 |
+# pleaes do not depend on pytest to avoid unnecessary USEDEP enforcement |
111 |
+RDEPEND=" |
112 |
+ dev-python/execnet[${PYTHON_USEDEP}] |
113 |
+ dev-python/pytest-forked[${PYTHON_USEDEP}] |
114 |
+ dev-python/six[${PYTHON_USEDEP}] |
115 |
+" |
116 |
+ |
117 |
+BDEPEND=" |
118 |
+ dev-python/setuptools_scm[${PYTHON_USEDEP}] |
119 |
+ test? ( |
120 |
+ ${RDEPEND} |
121 |
+ dev-python/filelock[${PYTHON_USEDEP}] |
122 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
123 |
+ ) |
124 |
+" |
125 |
+ |
126 |
+PATCHES=( |
127 |
+ "${FILESDIR}"/${P}-pytest4.patch |
128 |
+) |
129 |
+ |
130 |
+python_test() { |
131 |
+ distutils_install_for_testing |
132 |
+ pytest -vv testing || die "Tests failed under ${EPYTHON}" |
133 |
+} |