From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6CE7B138359 for ; Sat, 1 Aug 2020 22:29:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3825E0B01; Sat, 1 Aug 2020 22:29:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9A54DE0B01 for ; Sat, 1 Aug 2020 22:29:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8669834F2B7 for ; Sat, 1 Aug 2020 22:29:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A957D303 for ; Sat, 1 Aug 2020 22:29:43 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1596320980.2b5ff91101ffed5aa0667b8f1cd0e288c894935f.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-timeout/, dev-python/pytest-timeout/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pytest-timeout/files/pytest-timeout-1.4.2-optional-cov.patch dev-python/pytest-timeout/pytest-timeout-1.4.1-r1.ebuild dev-python/pytest-timeout/pytest-timeout-1.4.2.ebuild X-VCS-Directories: dev-python/pytest-timeout/files/ dev-python/pytest-timeout/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 2b5ff91101ffed5aa0667b8f1cd0e288c894935f X-VCS-Branch: master Date: Sat, 1 Aug 2020 22:29:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c11bd906-b461-486b-aaeb-e76e9bd9f2bd X-Archives-Hash: 068d69c1d2f19377dc86fdfe0d434338 commit: 2b5ff91101ffed5aa0667b8f1cd0e288c894935f Author: Michał Górny gentoo org> AuthorDate: Sat Aug 1 22:24:37 2020 +0000 Commit: Michał Górny gentoo 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 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?= +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