* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-timeout/, dev-python/pytest-timeout/files/
@ 2019-11-22 7:02 Patrick McLean
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McLean @ 2019-11-22 7:02 UTC (permalink / raw
To: gentoo-commits
commit: c4e0bd8268986a0a17abfda3735705431c746d54
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Fri Nov 22 07:00:55 2019 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Nov 22 07:00:55 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4e0bd82
dev-python/pytest-timeout: Version bump to 0.5.0, add py38
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/pytest-timeout/Manifest | 1 +
.../files/pytest-timeout-1.3.3-tests.patch | 25 +++++++++++++++++++
.../pytest-timeout/pytest-timeout-1.3.3.ebuild | 29 ++++++++++++++++++++++
3 files changed, 55 insertions(+)
diff --git a/dev-python/pytest-timeout/Manifest b/dev-python/pytest-timeout/Manifest
index cd55de718da..fe0a7846c6e 100644
--- a/dev-python/pytest-timeout/Manifest
+++ b/dev-python/pytest-timeout/Manifest
@@ -1,2 +1,3 @@
DIST pytest-timeout-1.2.0.tar.gz 13258 BLAKE2B 71c137fb0440c15cc8285b4bef51405a6b53deb850c109d1a892159e8758c712e9d1bae8f400adadf1b85cf399c0b87bd2cab51d959b4eb68023052f6c42788c SHA512 b86548843e9ff8c8f7d1c39735025cdfa98befe2860e2a8a5d422d08bd7f542032384f147125a2a2841268154cc3a3874ef0aa4765d454fd5390edb773b106ae
DIST pytest-timeout-1.2.1.tar.gz 11498 BLAKE2B 65b50ed52409ed0031c7c9b07ef5b96c088cdf98c0155c1a6405e701fbddc2da1070a9f5a63e22428bd2d18e0ad4eec4050239f7d786fa854256c86eb6be0b1b SHA512 749a0dad83b82e93a97a8590900f2285679ec368612fdcfe3f5f7a5b64774ac85196dc31df111c6a99efda92dc03f751f17ec20862bed1f6aea7d7e4140a06bb
+DIST pytest-timeout-1.3.3.tar.gz 11627 BLAKE2B e20348cc461ad03e95c22a16e753b72441ee70da9769214f4d07db15818a8997339ced47244b15de62a61107eb749dff8d6f41ddb4720c925ef1e6eb9962db27 SHA512 633f5aee550d568e403b958f4490ecb828eb322811c9f18cfefb26613be4fc36da14232ecbef8666fcf2dc693a93674c00a853ab546ea8328a07ea34da79fb84
diff --git a/dev-python/pytest-timeout/files/pytest-timeout-1.3.3-tests.patch b/dev-python/pytest-timeout/files/pytest-timeout-1.3.3-tests.patch
new file mode 100644
index 00000000000..d3fa9ca0fd3
--- /dev/null
+++ b/dev-python/pytest-timeout/files/pytest-timeout-1.3.3-tests.patch
@@ -0,0 +1,25 @@
+diff -ur pytest-timeout-1.3.3.orig/test_pytest_timeout.py pytest-timeout-1.3.3/test_pytest_timeout.py
+--- pytest-timeout-1.3.3.orig/test_pytest_timeout.py 2018-11-16 03:41:33.000000000 -0800
++++ pytest-timeout-1.3.3/test_pytest_timeout.py 2019-11-21 22:34:08.429287370 -0800
+@@ -1,4 +1,5 @@
+ import os
++import platform
+ import os.path
+ import signal
+ import time
+@@ -93,6 +94,6 @@
+ # assert 'Timeout' in result.stdout.str() + result.stderr.str()
+
+
+-@pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread'])
++@pytest.mark.parametrize('meth', [pytest.param('signal', marks=have_sigalrm), 'thread'])
+ @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session'])
+ def test_fix_setup(meth, scope, testdir):
+@@ -133,6 +134,6 @@
+ assert 'Timeout' not in result.stdout.str() + result.stderr.str()
+
+
+-@pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread'])
++@pytest.mark.parametrize('meth', [pytest.param('signal', marks=have_sigalrm), 'thread'])
+ @pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session'])
+ def test_fix_finalizer(meth, scope, testdir):
diff --git a/dev-python/pytest-timeout/pytest-timeout-1.3.3.ebuild b/dev-python/pytest-timeout/pytest-timeout-1.3.3.ebuild
new file mode 100644
index 00000000000..dcf68e3fb7b
--- /dev/null
+++ b/dev-python/pytest-timeout/pytest-timeout-1.3.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7,8}} pypy{,3} )
+
+inherit distutils-r1
+
+DESCRIPTION="py.test plugin to abort hanging tests"
+HOMEPAGE="https://pypi.org/project/pytest-timeout/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="dev-python/pytest[${PYTHON_USEDEP}]"
+BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}/pytest-timeout-1.3.3-tests.patch"
+)
+
+python_test() {
+ distutils_install_for_testing
+
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-timeout/, dev-python/pytest-timeout/files/
@ 2020-08-01 22:29 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2020-08-01 22:29 UTC (permalink / raw
To: gentoo-commits
commit: 2b5ff91101ffed5aa0667b8f1cd0e288c894935f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 1 22:24:37 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 1 22:29:40 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b5ff911
dev-python/pytest-timeout: Fix testing without pytest-cov
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../files/pytest-timeout-1.4.2-optional-cov.patch | 27 ++++++++++++++++++++++
.../pytest-timeout/pytest-timeout-1.4.1-r1.ebuild | 4 ++++
.../pytest-timeout/pytest-timeout-1.4.2.ebuild | 4 ++++
3 files changed, 35 insertions(+)
diff --git a/dev-python/pytest-timeout/files/pytest-timeout-1.4.2-optional-cov.patch b/dev-python/pytest-timeout/files/pytest-timeout-1.4.2-optional-cov.patch
new file mode 100644
index 00000000000..424cfa6c57d
--- /dev/null
+++ b/dev-python/pytest-timeout/files/pytest-timeout-1.4.2-optional-cov.patch
@@ -0,0 +1,27 @@
+From 65a79fe8ceb52d7ae978f4a2ecc47a1fd34fda2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 2 Aug 2020 00:11:53 +0200
+Subject: [PATCH] Skip test_cov if pytest-cov is not installed
+
+Skip test_cov gracefully if pytest_cov module can't be imported.
+This would help us since we're removing py2 support from pytest-cov
+but still need it for pytest-timeout.
+---
+ test_pytest_timeout.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test_pytest_timeout.py b/test_pytest_timeout.py
+index 16302d7..69707b4 100644
+--- a/test_pytest_timeout.py
++++ b/test_pytest_timeout.py
+@@ -77,6 +77,7 @@ def test_thread(testdir):
+ )
+ def test_cov(testdir):
+ # This test requires pytest-cov
++ pytest.importorskip("pytest_cov")
+ testdir.makepyfile(
+ """
+ import time
+--
+2.28.0
+
diff --git a/dev-python/pytest-timeout/pytest-timeout-1.4.1-r1.ebuild b/dev-python/pytest-timeout/pytest-timeout-1.4.1-r1.ebuild
index 56fd0feec5d..2821063d308 100644
--- a/dev-python/pytest-timeout/pytest-timeout-1.4.1-r1.ebuild
+++ b/dev-python/pytest-timeout/pytest-timeout-1.4.1-r1.ebuild
@@ -28,6 +28,10 @@ BDEPEND="
distutils_enable_tests pytest
+PATCHES=(
+ "${FILESDIR}"/pytest-timeout-1.4.2-optional-cov.patch
+)
+
python_test() {
distutils_install_for_testing
diff --git a/dev-python/pytest-timeout/pytest-timeout-1.4.2.ebuild b/dev-python/pytest-timeout/pytest-timeout-1.4.2.ebuild
index 56fd0feec5d..2821063d308 100644
--- a/dev-python/pytest-timeout/pytest-timeout-1.4.2.ebuild
+++ b/dev-python/pytest-timeout/pytest-timeout-1.4.2.ebuild
@@ -28,6 +28,10 @@ BDEPEND="
distutils_enable_tests pytest
+PATCHES=(
+ "${FILESDIR}"/pytest-timeout-1.4.2-optional-cov.patch
+)
+
python_test() {
distutils_install_for_testing
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-01 22:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-01 22:29 [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-timeout/, dev-python/pytest-timeout/files/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2019-11-22 7:02 Patrick McLean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox