public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest/files/, dev-python/pytest/
Date: Fri, 26 Jul 2019 01:29:43 +0000 (UTC)	[thread overview]
Message-ID: <1564104501.752f7623643670de40a66011906b69da6087f1c0.gyakovlev@gentoo> (raw)

commit:     752f7623643670de40a66011906b69da6087f1c0
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 26 01:12:05 2019 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Jul 26 01:28:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=752f7623

dev-python/pytest: bump to 5.0.1

had to drop a lot of keywords:
alpha amd64-fbsd amd64-linux arm arm64 hppa ia64
mips ppc ppc64 s390 sparc sparc-solaris
sparc64-solaris x64-solaris x86-linux x86-solaris

testsute passes
2346 passed, 50 skipped, 11 xfailed, 1 warnings

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-python/pytest/Manifest                         |  1 +
 .../files/pytest-5.0.1-test_xfail_rmdir.patch      | 38 ++++++++++++
 dev-python/pytest/pytest-5.0.1.ebuild              | 67 ++++++++++++++++++++++
 3 files changed, 106 insertions(+)

diff --git a/dev-python/pytest/Manifest b/dev-python/pytest/Manifest
index 607a625f644..c7e9d0ee56a 100644
--- a/dev-python/pytest/Manifest
+++ b/dev-python/pytest/Manifest
@@ -1,2 +1,3 @@
 DIST pytest-3.10.1.tar.gz 892420 BLAKE2B 38849ae69bf4380bc1a99aa105cac04be078da4460373dfc16fa555238b2830fa2f5ae6c19de8aa2af9ac18d87c5d2705d62f7b2e67e4a62d843f6a28bbd76fd SHA512 30ff79c0fdcbeef68e1191ff400a20428e391717f06957f554b694b94baaaa565dca01346fe989c3e443c4402f3b2bdbd5564f6303a4447f933fb54cba45628f
 DIST pytest-4.5.0.tar.gz 943607 BLAKE2B 49a0e91fda7f4231fdd39f90eb2daa344d3034c10faff221330ea0ae7482a2a7d0fb9443a0a264db00f1d92568d5a6005cb73e07d8643b46906f7ecff831adcb SHA512 cbffc6216f83491b1de241058315c116697bfaa5206b5f558192a7f861d43dd036d30d0d689bedae7bdee4f0258dd19ef5827c356e11863dd596a5fabe8249fc
+DIST pytest-5.0.1.tar.gz 949744 BLAKE2B c949f0fb6bc0d1430ec7c780537f8aee8ca1ebea5f89035d882434236c6af7d431a610774dbafa93552406e38852627a9f949a6f9198a792de9371efadb4f6ff SHA512 92f5feb263a8708ef6cb8f4565688620b6bfeaef23536cfd24b9bc09515e37fdecd7fa8bcaeeb0775c0be1d8e9dcbd9a56e52f97fb13dc98116efc0056f870db

diff --git a/dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch b/dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch
new file mode 100644
index 00000000000..5c6154cd92c
--- /dev/null
+++ b/dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch
@@ -0,0 +1,38 @@
+From ab39502c98f40c03a2956dcf6c6b9daf5ee41a63 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Fri, 26 Jul 2019 02:23:14 +0200
+Subject: [PATCH] In test_xfail_handling, only remove __pycache__ if it exists
+
+Previously, the test failed when the directory was not present,
+which could have been caused for example by invoking the tests
+with PYTHONDONTWRITEBYTECODE=1.
+
+Fixes https://github.com/pytest-dev/pytest/issues/5664
+---
+ changelog/5664.trivial.rst | 2 ++
+ testing/test_stepwise.py   | 3 ++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+ create mode 100644 changelog/5664.trivial.rst
+
+diff --git a/changelog/5664.trivial.rst b/changelog/5664.trivial.rst
+new file mode 100644
+index 000000000..3928454ef
+--- /dev/null
++++ b/changelog/5664.trivial.rst
+@@ -0,0 +1,2 @@
++When invoking pytest's own testsuite with ``PYTHONDONTWRITEBYTECODE=1``,
++the ``test_xfail_handling`` test no longer fails.
+diff --git a/testing/test_stepwise.py b/testing/test_stepwise.py
+index 591d67b6c..f61425b6b 100644
+--- a/testing/test_stepwise.py
++++ b/testing/test_stepwise.py
+@@ -207,7 +207,8 @@ def test_d(): pass
+ 
+     # because we are writing to the same file, mtime might not be affected enough to
+     # invalidate the cache, making this next run flaky
+-    testdir.tmpdir.join("__pycache__").remove()
++    if testdir.tmpdir.join("__pycache__").exists():
++        testdir.tmpdir.join("__pycache__").remove()
+     testdir.makepyfile(contents.format(assert_value="0", strict="True"))
+     result = testdir.runpytest("--sw", "-v")
+     result.stdout.fnmatch_lines(

diff --git a/dev-python/pytest/pytest-5.0.1.ebuild b/dev-python/pytest/pytest-5.0.1.ebuild
new file mode 100644
index 00000000000..b124d68a3a4
--- /dev/null
+++ b/dev-python/pytest/pytest-5.0.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Simple powerful testing with Python"
+HOMEPAGE="http://pytest.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+# When bumping, please check setup.py for the proper py version
+PY_VER="1.5.0"
+
+# pathlib2 has been added to stdlib before py3.6, but pytest needs __fspath__
+# support, which only came in py3.6.
+RDEPEND="
+	>=dev-python/atomicwrites-1.0[${PYTHON_USEDEP}]
+	>=dev-python/attrs-17.4.0[${PYTHON_USEDEP}]
+	dev-python/importlib_metadata[${PYTHON_USEDEP}]
+	>=dev-python/more-itertools-4.0.0[${PYTHON_USEDEP}]
+	dev-python/packaging[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep 'dev-python/pathlib2[${PYTHON_USEDEP}]' python3_5 )
+	>=dev-python/pluggy-0.12[${PYTHON_USEDEP}]
+	<dev-python/pluggy-1
+	>=dev-python/py-${PY_VER}[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+	dev-python/wcwidth[${PYTHON_USEDEP}]
+	virtual/python-funcsigs[${PYTHON_USEDEP}]"
+
+# flake cause a number of tests to fail
+DEPEND="${RDEPEND}
+	test? (
+		>=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
+		dev-python/nose[${PYTHON_USEDEP}]
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/requests[${PYTHON_USEDEP}]
+		>=dev-python/setuptools-40[${PYTHON_USEDEP}]
+		!!dev-python/flaky
+	)"
+
+PATCHES=(
+	"${FILESDIR}/${PN}"-4.5.0-strip-setuptools_scm.patch
+	"${FILESDIR}/${PN}"-5.0.1-test_xfail_rmdir.patch
+)
+
+python_prepare_all() {
+	grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency"
+
+	# Something in the ebuild environment causes this to hang/error.
+	# https://bugs.gentoo.org/598442
+	rm testing/test_pdb.py || die
+
+	distutils-r1_python_prepare_all
+}
+
+python_test() {
+	"${EPYTHON}" "${BUILD_DIR}"/lib/pytest.py -vv --lsof -rfsxX \
+		|| die "tests failed with ${EPYTHON}"
+}


             reply	other threads:[~2019-07-26  1:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  1:29 Georgy Yakovlev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-25 11:14 [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest/files/, dev-python/pytest/ Michał Górny
2023-07-05  8:03 Michał Górny
2023-05-29 10:50 Michał Górny
2023-05-24  8:32 Michał Górny
2022-10-03  6:33 Michał Górny
2022-03-16  7:56 Michał Górny
2022-01-28 21:50 Michał Górny
2019-05-15 16:11 Virgil Dupras
2019-01-10  1:15 Virgil Dupras
2018-07-16  9:26 Michał Górny
2017-01-30 18:56 Lars Wendler
2016-03-20 10:19 Dirkjan Ochtman
2016-01-25 15:11 Justin Lecher
2015-12-13 14:05 Justin Lecher
2015-11-20 11:29 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1564104501.752f7623643670de40a66011906b69da6087f1c0.gyakovlev@gentoo \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox