diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cc67f9140..b18bf6d22 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -41,6 +41,7 @@ * update pytest-cov-2.10.0 * add pytest-test-groups-1.0.3 * update pytest-sugar + * add pytest-xdist-1.32.0 2020-08-26 * fix https://git.edevau.net/onkelbeh/HomeAssistantRepository/issues/18#issuecomment-124 diff --git a/dev-python/pytest-xdist/Manifest b/dev-python/pytest-xdist/Manifest new file mode 100644 index 000000000..a24693698 --- /dev/null +++ b/dev-python/pytest-xdist/Manifest @@ -0,0 +1,4 @@ +AUX pytest-xdist-1.32.0-timeout.patch 1864 BLAKE2B dcecdd06bc1e41a1206f5bf08cd19b5bbb35fb5bbf8e81aa188a75e43c648c68b052e3eb6e9041d1f92337a271e278cc60d4e9a7cbdaa43c0f155f5425373cdf SHA512 71520b9da47c272799c91f1856979bb087f7dda73bebb38f6288c2c688953853ce474e92608d84dc17316d22cd7cb78027144269662ce4cc6f62b923acf620ba +DIST pytest-xdist-1.32.0.tar.gz 67733 BLAKE2B da0ce4e43dc8752e4329ddcbc13a5f55f5bc120c13f39bb01916770d2dc1864197fd91f92bc55ba27cd74b0d837ac2d310980874cdf54761339b2cd654dd6e74 SHA512 f159b4653efb4afeff4124df484670d3c672e1014712f948390b25efc53096f8237258c83a5f1a9e688c52b4a756291cb731d37fdfa800707f556550a19cb0e8 +EBUILD pytest-xdist-1.32.0.ebuild 1056 BLAKE2B 94e4bdef998cbe0fb49237c364223aa761247ebea7970720491113aaa11aaf65b8afa4cf11bae2be7ad6a980bd060bbc18ef0484c2803f67dec76fb192963b28 SHA512 64703fa61cd35fd69970c3574b38fda94fe534ab59949092d5da6551e9093596f00c0a0f896d862077f250eb8e934bc6a74c120c41c33b2a23aa2657abf8fc24 +MISC metadata.xml 453 BLAKE2B 9480ffb520fafac8b32ec407fb065a89b67c085c7474032528e6a7489fdb26d288228cb75a502e407d92f0e53283bda58c2632e552d4daf65d37b78d33b3598b SHA512 13ec72148a023c16de4b51f02f8a34f5a29ba26bae56aebd8a89ca7a90f249126f92096d138d41d770eb1053618e58679211f468e3136f594514a936f414b265 diff --git a/dev-python/pytest-xdist/files/pytest-xdist-1.32.0-timeout.patch b/dev-python/pytest-xdist/files/pytest-xdist-1.32.0-timeout.patch new file mode 100644 index 000000000..52fdc681d --- /dev/null +++ b/dev-python/pytest-xdist/files/pytest-xdist-1.32.0-timeout.patch @@ -0,0 +1,50 @@ +From 27519e8018ee199219ab223e0b31b76b4e950a2a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sun, 3 May 2020 11:23:33 +0200 +Subject: [PATCH] Increase pexpect timeouts to prevent tests from failing + +--- + testing/acceptance_test.py | 2 +- + testing/test_looponfail.py | 6 ++++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py +index b6a4a94..a089baa 100644 +--- a/testing/acceptance_test.py ++++ b/testing/acceptance_test.py +@@ -332,7 +332,7 @@ class TestDistribution: + time.sleep(10) + """ + ) +- child = testdir.spawn_pytest("-n1 -v") ++ child = testdir.spawn_pytest("-n1 -v", expect_timeout=30.0) + child.expect(".*test_sleep.*") + child.kill(2) # keyboard interrupt + child.expect(".*KeyboardInterrupt.*") +diff --git a/testing/test_looponfail.py b/testing/test_looponfail.py +index 94fccd7..a6ebebe 100644 +--- a/testing/test_looponfail.py ++++ b/testing/test_looponfail.py +@@ -284,7 +284,8 @@ class TestFunctional: + ) + # p = testdir.mkdir("sub").join(p1.basename) + # p1.move(p) +- child = testdir.spawn_pytest("-f %s --traceconfig" % p) ++ child = testdir.spawn_pytest("-f %s --traceconfig" % p, ++ expect_timeout=30.0) + child.expect("def test_one") + child.expect("x == 1") + child.expect("1 failed") +@@ -311,7 +312,8 @@ class TestFunctional: + pass + """ + ) +- child = testdir.spawn_pytest("-f %s" % p) ++ child = testdir.spawn_pytest("-f %s" % p, ++ expect_timeout=30.0) + child.expect("1 xpass") + # child.expect("### LOOPONFAILING ####") + child.expect("waiting for changes") +-- +2.26.2 + diff --git a/dev-python/pytest-xdist/metadata.xml b/dev-python/pytest-xdist/metadata.xml new file mode 100644 index 000000000..a8cd82139 --- /dev/null +++ b/dev-python/pytest-xdist/metadata.xml @@ -0,0 +1,14 @@ + + + + + python@gentoo.org + Python + + + + pxml + metagriffin/pxml + pytest-dev/pytest-xdist + + diff --git a/dev-python/pytest-xdist/pytest-xdist-1.32.0.ebuild b/dev-python/pytest-xdist/pytest-xdist-1.32.0.ebuild new file mode 100644 index 000000000..0a7311caa --- /dev/null +++ b/dev-python/pytest-xdist/pytest-xdist-1.32.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Distributed testing and loop-on-failing modes" +HOMEPAGE="https://pypi.org/project/pytest-xdist/ https://github.com/pytest-dev/pytest-xdist" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +SLOT="0" +LICENSE="MIT" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~s390 sparc x86" +IUSE="test" +RESTRICT="!test? ( test )" + +# pleaes do not depend on pytest to avoid unnecessary USEDEP enforcement +RDEPEND=" + dev-python/execnet[${PYTHON_USEDEP}] + dev-python/pytest-forked[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] +" + +BDEPEND=" + dev-python/setuptools_scm[${PYTHON_USEDEP}] + test? ( + ${RDEPEND} + dev-python/filelock[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}"/pytest-xdist-1.32.0-timeout.patch +) + +python_test() { + distutils_install_for_testing + pytest -vv testing || die "Tests failed under ${EPYTHON}" +}