add new pytest

This commit is contained in:
Andreas Billmeier 2019-01-10 12:03:06 +01:00
parent 330512bf25
commit 9b86f10f30
4 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,4 @@
AUX pytest-3.4.2-pypy-syntaxerror-offset.patch 996 BLAKE2B ff6d362d20f6432f73956e1aee4c2bc596e3d8e3347da3624dfd3cbfdd1eabd8872058737e8f9b558f3570878756c7b87a65514956b1e81235c2727e8ff2fc63 SHA512 4a28ddc07389aac79e46528e85229aba126a89c27b7bec73b406766be49f5c8be9bdc2cb3158bfb475b4d6371e2f33960e1ed154e3b9eda15aeb8b151f3d2148
DIST pytest-4.0.2.tar.gz 904958 BLAKE2B ea245fab1363350d6e9aa0eab4aa5cd732561c6f4192e90f2fdc68b1a31941b91bde23b9840c3df7804a4712b8d26bd3b65d2789988e2994ad7c61a272184804 SHA512 6c77024cdd0a14ad417d7acece89e6b06530ceec1d6950a7cae265bddff44182d1839ced59c34ed9add8eb55214d69f01bd77499b8d3b483ada5ba47bca28802
EBUILD pytest-4.0.2.ebuild 2190 BLAKE2B 11afe662abfeccadfb9ed37678095c6e41939af9800cc07c736b256c062c71479469e35675d1c3ffb31f4b274159a7f769d22ea72f9fbbc44c3f5bd27dfb1849 SHA512 e8acb146b426f456540f6d0c33b552f19544677542e980af5a9647cc837466e8ec295c233da1cdb447e441ccef4e077cf048cd567418b4bd0cbf428956d0c81b
MISC metadata.xml 309 BLAKE2B f29391c5f96f44f6329d3665346a5d46ecb4a86d103ae8008769af86126756e76bfa89cfe462e9c219e5f70b64013f662d020c7a2f6015d8cadd0eb25a7614eb SHA512 ba53c13ac716488e3e5dadf5dcfcb697dc9bb13f89e9d0fb98b9a5a6e36cafeeb64d1348008f42497117bf46fb6f3bc288c10a68c4d5ab53c9c02a3ae61b594f

View File

@ -0,0 +1,27 @@
https://salsa.debian.org/python-team/modules/pytest/commit/405c05a0827592515de76e23c94de1f7773273e6.patch
From 405c05a0827592515de76e23c94de1f7773273e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=BD?= <onovy@debian.org>
Date: Thu, 10 May 2018 11:42:56 +0200
Subject: [PATCH] Fix PyPy SyntaxError offset in tests
---
testing/code/test_source.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testing/code/test_source.py b/testing/code/test_source.py
index fcce3fa..22278d8 100644
--- a/testing/code/test_source.py
+++ b/testing/code/test_source.py
@@ -117,7 +117,7 @@ def test_source_strip_multiline():
def test_syntaxerror_rerepresentation():
ex = pytest.raises(SyntaxError, _pytest._code.compile, 'xyz xyz')
assert ex.value.lineno == 1
- assert ex.value.offset in (4, 7) # XXX pypy/jython versus cpython?
+ assert ex.value.offset in (4, 5, 7) # XXX pypy/jython versus cpython?
assert ex.value.text.strip(), 'x x'
--
2.18.0

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="pypi">pytest</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,65 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy{,3} )
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="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
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/more-itertools-4.0.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/pathlib2[${PYTHON_USEDEP}]' python2_7 python3_{4,5} )
>=dev-python/pluggy-0.7[${PYTHON_USEDEP}]
>=dev-python/py-${PY_VER}[${PYTHON_USEDEP}]
>=dev-python/setuptools-40[${PYTHON_USEDEP}]
>=dev-python/six-1.10.0[${PYTHON_USEDEP}]
virtual/python-funcsigs[${PYTHON_USEDEP}]"
# flake & pytest-capturelog cause a number of tests to fail
DEPEND="${RDEPEND}
dev-python/setuptools_scm[${PYTHON_USEDEP}]
test? (
>=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' -2)
dev-python/requests[${PYTHON_USEDEP}]
!!dev-python/flaky
!!dev-python/pytest-capturelog
)"
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
# those tests appear to hang with python3.5+; TODO: investigate why
sed -i -e 's:test_runtest_location_shown_before_test_starts:_&:' \
testing/test_terminal.py || die
sed -i -e 's:test_trial_pdb:_&:' testing/test_unittest.py || die
distutils-r1_python_prepare_all
}
python_test() {
"${PYTHON}" "${BUILD_DIR}"/lib/pytest.py --lsof -rfsxX \
-vv testing || die "tests failed with ${EPYTHON}"
}