summaryrefslogtreecommitdiff
path: root/dev-python/pytest
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
commitb24bd25253fe093f722ab576d29fdc41d04cb1ee (patch)
tree0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /dev-python/pytest
parent121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff)
gentoo resync : 02.08.2019
Diffstat (limited to 'dev-python/pytest')
-rw-r--r--dev-python/pytest/Manifest3
-rw-r--r--dev-python/pytest/files/pytest-5.0.1-test_xfail_rmdir.patch38
-rw-r--r--dev-python/pytest/pytest-5.0.1.ebuild67
3 files changed, 108 insertions, 0 deletions
diff --git a/dev-python/pytest/Manifest b/dev-python/pytest/Manifest
index 357907eb7407..4896767a1c4f 100644
--- a/dev-python/pytest/Manifest
+++ b/dev-python/pytest/Manifest
@@ -1,6 +1,9 @@
AUX pytest-4.5.0-strip-setuptools_scm.patch 674 BLAKE2B 4eab3e26423d81614223a88a0124dc4f35892b18ecbcce34280a00774012822fced0045ac7113a50f8f88d042b88e404dbf4d8d3760140c66a48daa3da2a44c6 SHA512 d34d7c1db57804f0d1ff71f3f51c9a736592945fdf564f54c0c20c398c86f08616eb21f75d77457a71738df4d254ec3d69e46aa3378dea6f7913933bcdf45c08
+AUX pytest-5.0.1-test_xfail_rmdir.patch 1589 BLAKE2B 8c4ed570175fa3b2461fd5dde31e6618a0a2af7cef19529995a8f537b0bda1acbabf949761cf36db5f8d1fbf04cf7ec3bc6c40f249d8f158540d85ad2388c768 SHA512 fdf17a7c2d4bde5b1cfa01224cb464c3cae469dd1ab7fcd4158a57525127bc51ea19b777b01b4726a6190ecbde74e47d38cdcdd0fbfba31b4e6c76bac13009ce
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
EBUILD pytest-3.10.1.ebuild 2442 BLAKE2B 510febc15eb52b5e5c6b66c1849ae23911a88340172027a3c92dabe68de9e49bad4dd10265b9bfaace126b8ef61b9b9dfbe758c264d75c900ab5852dd30a9443 SHA512 ba012c44d8ec1981f36bd95c0ea17570bf64ed28ba51194be772be382adb2b1e239b2556a8549794deda4916ee94dbbe3cddd6aafc13f3d5607f2c8ba59bd5cf
EBUILD pytest-4.5.0.ebuild 2060 BLAKE2B 1bf5a649b72e1669d37596900fc81264b99c0654c9218635a4fcea4254fd5944cf74a8640ff34a9d359ca236d252d9aa00a0820b3084f42f183913e9a6df6ab3 SHA512 1c4c081301e3ff42caf703196aeeb9bcd377bee18aef182a2c2d499d567285437305c06c0a02f0ce28ff99324af25946b310f8071c6330bcc7ac79bd163ac1f9
+EBUILD pytest-5.0.1.ebuild 1923 BLAKE2B ad6e07b32be669d7225fcb1c9d396c01a601130cb8e2b6a5f06485ee0a1778ee4580ef3d03f864561b99fd2eb91c9421acb3dae426f32a12f9c7acc8af36c4f0 SHA512 5bfb419b68015969f62ccce3c4579d4175ae1937228741dbf1c2a97f3e1828870333446623ec6e3c42cd57a049b5386539ab7479584e2e9030276309098477f2
MISC metadata.xml 309 BLAKE2B f29391c5f96f44f6329d3665346a5d46ecb4a86d103ae8008769af86126756e76bfa89cfe462e9c219e5f70b64013f662d020c7a2f6015d8cadd0eb25a7614eb SHA512 ba53c13ac716488e3e5dadf5dcfcb697dc9bb13f89e9d0fb98b9a5a6e36cafeeb64d1348008f42497117bf46fb6f3bc288c10a68c4d5ab53c9c02a3ae61b594f
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 000000000000..5c6154cd92c0
--- /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 000000000000..b124d68a3a41
--- /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}"
+}