summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2013-11-30 03:50:54 +0000
committerMike Gilbert <floppym@gentoo.org>2013-11-30 03:50:54 +0000
commit339f0b9c3617287cbbd34528ae3c7c3fc6330d62 (patch)
tree381901ad6535ade80e7d50c425f458b2c36fd276 /dev-python
parentx86 stable wrt bug #488156 (diff)
downloadhistorical-339f0b9c3617287cbbd34528ae3c7c3fc6330d62.tar.gz
historical-339f0b9c3617287cbbd34528ae3c7c3fc6330d62.tar.bz2
historical-339f0b9c3617287cbbd34528ae3c7c3fc6330d62.zip
Fix pexpect-3.0 problems in tests.
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0x0BBEEA1FEA4843A4
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pytest/ChangeLog6
-rw-r--r--dev-python/pytest/Manifest21
-rw-r--r--dev-python/pytest/files/pytest-2.4.2-pexpect-3.0.patch113
-rw-r--r--dev-python/pytest/pytest-2.4.2.ebuild12
4 files changed, 130 insertions, 22 deletions
diff --git a/dev-python/pytest/ChangeLog b/dev-python/pytest/ChangeLog
index 5271980f0003..4b45b3efaca9 100644
--- a/dev-python/pytest/ChangeLog
+++ b/dev-python/pytest/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/pytest
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pytest/ChangeLog,v 1.81 2013/11/17 04:13:46 prometheanfire Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pytest/ChangeLog,v 1.82 2013/11/30 03:50:52 floppym Exp $
+
+ 30 Nov 2013; Mike Gilbert <floppym@gentoo.org>
+ +files/pytest-2.4.2-pexpect-3.0.patch, pytest-2.4.2.ebuild:
+ Fix pexpect-3.0 problems in tests.
17 Nov 2013; Matthew Thode <prometheanfire@gentoo.org> pytest-2.4.2.ebuild:
added pytest-2.4.2 with restricted tests due to upstream bug
diff --git a/dev-python/pytest/Manifest b/dev-python/pytest/Manifest
index b3a88ab8a047..0f6db7578e14 100644
--- a/dev-python/pytest/Manifest
+++ b/dev-python/pytest/Manifest
@@ -2,28 +2,19 @@
Hash: SHA256
AUX pytest-2.3.4-unicode.patch 1589 SHA256 2ebca1e0b4c79d45c1d558938f04aa8a30166f90eb0d40ec0809679b95e6ad0a SHA512 d187d08608f8cc5c9f97a2cd58497262f37b0c8c08a88eca1ee2e9726196a97d56d1d510cfde1e7d74ce49086608164145525e37f23086efff7e457d71d8f980 WHIRLPOOL bfcf7099a8d516020f4914d8c6963f54b1e92e323ab939e214bff42cb556d76e64fe98bede7e566173dd09906407fcdab9786d11216bb92c209a9999cf421cbb
+AUX pytest-2.4.2-pexpect-3.0.patch 3514 SHA256 92909fdf1179634e95a4bd4d56bd946366e99fcc09643b7a160ac44284fde3d7 SHA512 83439ad1b3f952cf728848a3daabc28ad723917dd5e305ab87066805fa379aad28649cdc6acd060f85a15caebd0db416c794dae526195f62fd6dd0c0ec607de0 WHIRLPOOL 5e580ecf0b191d70f1640d8dc6b949cdbd905c583b32045fd79982c77b1b11452d35c34613bcab03caab82b127173f422f2e80de577349f34e211771b5f9e266
DIST pytest-2.3.4.zip 527214 SHA256 5616f744a311c5f5fbb44943aaa41c32df70ba132159a0a9fb6c999060d7645c SHA512 390ceb05fc79eec14861ac23f74b4ca64cff54a10c8a7d61ac148fd101d418c1f286777c50f181148c60e0b02c6bdeacf224ad0b2a88104b3b29e7761ed1bea9 WHIRLPOOL 3afa5442d4900ee93a11614e50d67407a2fc6d2f55ffd700b7b64b1ed20be0895f6fe35adeb9926491eea1b2500f62d49f77afd17471c0a4f1be52cb971f4ab6
DIST pytest-2.3.5.tar.gz 426328 SHA256 804c28bef415fc6a54de7934f05b2d67a9cc8a230de98685fca274d9fcbe8b1c SHA512 4cda3149ca4b69b88c2df65d7c474506e852ee1daa9e6b1ca3dbde8b7ffe0cce09f2fb4ef696f54df7f6ce807cd472dd8447cfc32686902b2b214b18e5719060 WHIRLPOOL a2dd7c319d73e6c32077685d65785c672dbb6faa01ac4ed116520128a1b03b3a10b88e65957b736132fbc3a667b43840c28081ef4a4a8ddd2cd73f8727c778cf
DIST pytest-2.4.2.tar.gz 553004 SHA256 bccbbed432b1e95381fbb958c27aabcb751ccc337769091de8b7e5cd25ca00e0 SHA512 2ffbc74c536fa4542b9f9afb257428cde98648c76335bdc8d3fd515fd094410fe1e71e502918d780f1d8070bebf4e4c24b33cab04d0f48ca983d907bfc43d3db WHIRLPOOL e51543a549622dfd204551f3625c62cdac84b33107e5dd493574a6f05f4ee55a830ec52ce23580733471df89450caa0d389cc77c9966186bd9d2d64e57403638
EBUILD pytest-2.3.4.ebuild 1553 SHA256 2f4b1884ff0adb1b8bc24d51b76f85c3f9ba130d95e5d751fba4bd4b464601ab SHA512 583ebc17c7d5ab0871f0d7e35a2aa46c11373aa3796efc42afe9b854a790e7fd33db5bc4d82126538036cf34eb030506cef595db748c78a0be184a75e5011183 WHIRLPOOL d68c04f2372404605d01e1447d4353d5f1aefd9a7057b8550139695be1dfb5ade5c431759cce495e09dd882f1eb897a6cebad9b7815444c45ab998d00b565d49
EBUILD pytest-2.3.5.ebuild 1513 SHA256 0a7521ee1240942a878c1cbe51fc29f513c628c61ec1cd7b3a45786e15427e5c SHA512 cbf571f8fc88ecb6577e9e6279563e19ace136a5cdd68dcf0bf2e49c5d631b412c7a2a1a54562c8f72c512c38fd73831500af6b8a46f611231540feac94cef35 WHIRLPOOL a35ef93ac48ffa876bee4006cff2024cae227f70ec92c934d3a34a46c1c3f63fa13e49405e51bc2aa901f62e308284fe3e2275037ca9c044ec60219d2fec51e4
-EBUILD pytest-2.4.2.ebuild 2018 SHA256 db6c9cfbd3f9d6c689a2fbcd8712d26b0357578022b00c26ba9a39fa084db6a3 SHA512 8d3997af2efc85ae35f2b1bb5494823132ea3b7b4be822822257fe72ec8ee43a25e2713ee9ab92f41bf65839a3216898314e5f6036e7fb2740482d174c960e7f WHIRLPOOL 60fbb1ee0f8e03c297abd9b97846d6a96a390d1b5bd8c912fa05e865f0a5d9ebe8a110161c984c5c27c49939dab43b8e636eeffa76cd180848a23b9dbc2f512e
-MISC ChangeLog 10448 SHA256 a1cdbe2647b1e5fcfceb72939693c0d5d0571c14165451486a1e82d622b2cde6 SHA512 997f60bfd4f303ed91185aa7cda735045d8e6c6b52b129a2ca579fea06fd990ecbd572f4eda9458d9f777159bbeb6c073c67231ef32cfb40b5801176149dee0c WHIRLPOOL f6b0654cc68aeb7e87ff1ae7dee313bdf566e144a21f27c8cb3995e1c4056c5db6223ac8d7b8905dbdeb04e153db91c3381db94f3444bf4a194ea7fbc005c2f5
+EBUILD pytest-2.4.2.ebuild 1874 SHA256 9da4a94ff206e7066764c735e8949d26f113061e04a33764508f4c097d165cf5 SHA512 51c36380ea521afbb7e6286ad38d8a7118e871484221bb58753cb100696fa4ab1629b5f7c1875c6cf87ebe6c8de2aab376406ebd2440a02f20f0eb13b02496d0 WHIRLPOOL f8d5383ba7f196ec6600ef3fbde27c3bf894f3d35b7ab50b3afb16e0a986289aae9d36bdd60d3ee47071e7806b1cd8b5fed1b413cbeb797dace03140055a2d61
+MISC ChangeLog 10590 SHA256 08df24f430f27a15f00c6147dbc392e3f732ac64331d0401a45e1a7aaae316be SHA512 4c0379dfa62140d149fa3232bbb5394c3903c0e67e3b6e3e7a026eba75517759a6632c91ed0a40e7e69ae24b44b06b09fc1acb4c2f99f53ebb9a3b24139b63ed WHIRLPOOL edb3658c149387eeb2e13c1b850752254f824084abb37a8ee1e0bc6ae2bec1ebc83ab9dae052ab96aa0e700880de46f128a4182023f2164dc2ca6f6c87ce6662
MISC metadata.xml 229 SHA256 d84d28d5adf361bcc2b76c4b2c47920c5b06472add64c47c790522f180f93dce SHA512 9ad7198911f7c6318bcca718f8ab1d436ea14df3edefab5d5b20e36f9ab2c06f3d7d1d3a89ace9b6485b36a93bae88db28d443f51a375c8c2b8f4fe750657139 WHIRLPOOL 0aa5c9b1a9e5f07dfff7cd90a8ecb9ba54820d13261b822a8978492ff3a22369d27cafae2f772f76aac0f55f42e4b636b7c5190677eb6404be6002782ee79925
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCAAGBQJSiEMMAAoJECRx6z5ArFrDOQEP/iQegsofqGEpxFHx/vMTH2j6
-AadbFNslZ8IUCTHJ1/nYTvGjGinYcYPGkAjivDNesJQxsnpzrK/89io56PgwzKeq
-si9UGuBs5GFIl+6N9NOCE7fFCN+zkB2/1WsHzzRpcwASP0vrxkk3h5lFjkNEzoAJ
-hn16lKEuogI5m2W2R9Pu67yzciMeAaN15CBH+DtGENCVL62nvaVBgYry+S3OvxkJ
-nr22bJYxWY5xlJVin5g6J30Q//ppqGh+DRyNIxaXrEZ0ENE0cUJN/VoAGqkRFPDE
-bGp6ZcTuVbFj+oomzxcmnXaXVbCefKfkDxJ9sJzaj1XTekzC/uwZ2AOVF3+irUJh
-+wAkbTZG/z8rcRrxpTcKPf44eocyU8cpRqVz74mqNU7f0s1rndZ5Jl0bWVh/QVS9
-FpNU46nP2kR8cTTpofqTRVQVzlHuEkBVPvTKrOfI/jTw2A+6CEIDDptQInUmGgxD
-ME6XybSG8nVY/ZTA36FpoDzYM+VgxrtZrA+dNN2lPP3iGdQP/JVPsukg3q/RrhLW
-TBREGg7MzGfqUl1lYgEbsmSwyeRI4Mp/RZjLBQpj9OkPDl/jp4rp6kg2hML/4Rwv
-JdYB+mJ4chsdWqzDlOipOgL8cuxIOt6hamKfX5v5dbFF4lGJ1vhu8wAimZT7RYQY
-FR6lkgmnuk8pSShO52cF
-=0KKz
+iF4EAREIAAYFAlKZYJ0ACgkQC77qH+pIQ6RrjwEAyb4NQJafmDUTvv5cFUovfwuY
+kQIE3btPSPUcMJr8M98A/ievUd1HqNGAqVBt5iN9SoDenkCZa8ibRaVpmJ/9FMok
+=/Bxm
-----END PGP SIGNATURE-----
diff --git a/dev-python/pytest/files/pytest-2.4.2-pexpect-3.0.patch b/dev-python/pytest/files/pytest-2.4.2-pexpect-3.0.patch
new file mode 100644
index 000000000000..ffdbd866211c
--- /dev/null
+++ b/dev-python/pytest/files/pytest-2.4.2-pexpect-3.0.patch
@@ -0,0 +1,113 @@
+# HG changeset patch
+# User holger krekel <holger@merlinux.eu>
+# Date 1384852227 -3600
+# Node ID 304f9f212ae373dbb55129b41b88e413baceba51
+# Parent 77b0a734de063196acea35e63c0ece16078cd8f0
+fix pexpect-3.0 compatibility for pytest's own tests.
+(fixes issue386)
+
+diff --git a/_pytest/pytester.py b/_pytest/pytester.py
+--- a/_pytest/pytester.py
++++ b/_pytest/pytester.py
+@@ -516,15 +516,16 @@
+ return self.spawn(cmd, expect_timeout=expect_timeout)
+
+ def spawn(self, cmd, expect_timeout=10.0):
+- pexpect = py.test.importorskip("pexpect", "2.4")
++ pexpect = py.test.importorskip("pexpect", "3.0")
+ if hasattr(sys, 'pypy_version_info') and '64' in py.std.platform.machine():
+ pytest.skip("pypy-64 bit not supported")
+ if sys.platform == "darwin":
+ pytest.xfail("pexpect does not work reliably on darwin?!")
+ if sys.platform.startswith("freebsd"):
+ pytest.xfail("pexpect does not work reliably on freebsd")
+- logfile = self.tmpdir.join("spawn.out")
+- child = pexpect.spawn(cmd, logfile=logfile.open("w"))
++ logfile = self.tmpdir.join("spawn.out").open("wb")
++ child = pexpect.spawn(cmd, logfile=logfile)
++ self.request.addfinalizer(logfile.close)
+ child.timeout = expect_timeout
+ return child
+
+diff --git a/testing/test_pdb.py b/testing/test_pdb.py
+--- a/testing/test_pdb.py
++++ b/testing/test_pdb.py
+@@ -62,7 +63,7 @@
+ child.expect(".*i = 0")
+ child.expect("(Pdb)")
+ child.sendeof()
+- rest = child.read()
++ rest = child.read().decode("utf8")
+ assert "1 failed" in rest
+ assert "def test_1" not in rest
+ if child.isalive():
+@@ -127,7 +128,7 @@
+ child.expect("x = 3")
+ child.expect("(Pdb)")
+ child.sendeof()
+- rest = child.read()
++ rest = child.read().decode("utf-8")
+ assert "1 failed" in rest
+ assert "def test_1" in rest
+ assert "hello17" in rest # out is captured
+@@ -144,7 +145,7 @@
+ child.expect("test_1")
+ child.expect("(Pdb)")
+ child.sendeof()
+- rest = child.read()
++ rest = child.read().decode("utf8")
+ assert "1 failed" in rest
+ assert "reading from stdin while output" not in rest
+ if child.isalive():
+@@ -182,7 +183,7 @@
+ child.expect("0")
+ child.expect("(Pdb)")
+ child.sendeof()
+- rest = child.read()
++ rest = child.read().decode("utf8")
+ assert "1 failed" in rest
+ if child.isalive():
+ child.wait()
+@@ -206,7 +207,7 @@
+ child.sendline('c')
+ child.expect("x = 4")
+ child.sendeof()
+- rest = child.read()
++ rest = child.read().decode("utf8")
+ assert "1 failed" in rest
+ assert "def test_1" in rest
+ assert "hello17" in rest # out is captured
+@@ -238,6 +239,7 @@
+ child.expect("x = 5")
+ child.sendeof()
+ child.wait()
++
+ def test_pdb_collection_failure_is_shown(self, testdir):
+ p1 = testdir.makepyfile("""xxx """)
+ result = testdir.runpytest("--pdb", p1)
+diff --git a/tox.ini b/tox.ini
+--- a/tox.ini
++++ b/tox.ini
+@@ -16,6 +16,7 @@
+ [testenv:py25]
+ setenv =
+ PIP_INSECURE=1
++deps=nose
+
+ [testenv:flakes]
+ changedir=
+@@ -55,14 +56,6 @@
+ commands=py.test --doctest-modules _pytest
+ deps=
+
+-[testenv:py32]
+-deps=
+- nose
+-
+-[testenv:py33]
+-deps=
+- nose
+-
+ [testenv:doc]
+ basepython=python
+ changedir=doc/en
diff --git a/dev-python/pytest/pytest-2.4.2.ebuild b/dev-python/pytest/pytest-2.4.2.ebuild
index 8100eeafa737..e65bd323ac96 100644
--- a/dev-python/pytest/pytest-2.4.2.ebuild
+++ b/dev-python/pytest/pytest-2.4.2.ebuild
@@ -1,16 +1,12 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pytest/pytest-2.4.2.ebuild,v 1.3 2013/11/17 04:13:46 prometheanfire Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pytest/pytest-2.4.2.ebuild,v 1.4 2013/11/30 03:50:52 floppym Exp $
EAPI="5"
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy2_0 )
inherit distutils-r1 eutils
-RESTRICT="test"
-#testing restricted due to test failures with pexpect-3.0 (which is required for pypy2_0 and python3_x support)
-#https://bitbucket.org/hpk42/pytest/issue/386/tests-fail-with-pexpect-30
-
DESCRIPTION="py.test: simple powerful testing with Python"
HOMEPAGE="http://pytest.org/ http://pypi.python.org/pypi/pytest"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
@@ -29,7 +25,11 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
virtual/python-argparse[${PYTHON_USEDEP}]
test? ( dev-python/pyyaml[${PYTHON_USEDEP}]
- dev-python/pexpect[${PYTHON_USEDEP}] )"
+ >=dev-python/pexpect-3.0[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+ "${FILESDIR}/pytest-2.4.2-pexpect-3.0.patch"
+)
python_prepare_all() {
# Disable versioning of py.test script to avoid collision with