commit:     a4b6f280123ceb0df064e80c7b007f65bfae1b52
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 20 11:21:34 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Nov 20 11:29:21 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4b6f280

dev-python/pytest: Version Bump

Fixes test problems with pypy3

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=564764

Package-Manager: portage-2.2.25
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-python/pytest/Manifest                         |  1 +
 .../files/pytest-2.8.3-skip-test-on-pypy.patch     | 96 ++++++++++++++++++++++
 dev-python/pytest/pytest-2.8.2.ebuild              |  2 +
 .../{pytest-2.8.2.ebuild => pytest-2.8.3.ebuild}   |  7 +-
 4 files changed, 105 insertions(+), 1 deletion(-)

diff --git a/dev-python/pytest/Manifest b/dev-python/pytest/Manifest
index 761f698..88e523a 100644
--- a/dev-python/pytest/Manifest
+++ b/dev-python/pytest/Manifest
@@ -3,3 +3,4 @@ DIST pytest-2.7.3.tar.gz 548235 SHA256 
d5a9c3db3515ab95902ba08c09d1e941a21a440dc
 DIST pytest-2.8.0.zip 8189680 SHA256 
29ed6fdb7b287f5353620494e950aba652c593c40556aece95a4d23d403ae2cb SHA512 
98f7131c3396848ef7dbcf67e21e0329f8a3b771b3f8b832c1894758b34a2f852209f809001da856cfe8ea3773b257405ae2d5f8a04152242b8692e1511289ed
 WHIRLPOOL 
3fd7f6ec73f11f29fd9b67bbb0c28dd73605604053160111212bd43d2c85c0b6cec5a25a979fecabb83a097c5621d5460747df5cb08796866349b7ba71b12005
 DIST pytest-2.8.1.tar.gz 580991 SHA256 
2b58662d356ee953bc40f7a73857d05f0bd07f0a8507c929de3006dd6b14c918 SHA512 
b73237810b69ecd504c2bdeeee51af62d7ed23091b7bcc74cd1fcc8683dc582cadfd68b9eaed3259165bac6ddca5fb960b8dc295e82cfb9120f4b732d07843fe
 WHIRLPOOL 
16b27620bd0edde16d28dc247352c0a1b6042ac79bcb7a76b67fc4917ef6a42462767343a5e86acfe6880ba0372a124fb11491e670abde6ffdb48e03963243db
 DIST pytest-2.8.2.tar.gz 563955 SHA256 
da2fc57320dd11f621d166634c52b989aa2291af1296c32a27a11777aa4128b9 SHA512 
0df6e0421d1575e1efc0bb0550c5993f802777cb616ab1514bf12ed11eb5ec35a142dd837ff65659989268c36e441e18108369991cd3d458d357aac6ba433991
 WHIRLPOOL 
ea917f4aaec444d6edc830b4ec66f7adb305031f11328e47d12a609ec92368a5c56e9cf8e24bd1a9a4a6a0746b43133f0d9821cf27d74c15ed2a83a705ee6030
+DIST pytest-2.8.3.tar.gz 880441 SHA256 
37d950e93c1fd7e04d816a3ca4a5226ea2531c6d531c8284ad9b88848417e720 SHA512 
04dd9041729d83b98a15cef22aac65dfb95cd3bf6b71a580ff91e8738f9a1ad5ee46fae45c950342e4a0162e38c875299a46fc69ec74702f36a1e36ef76dc0d6
 WHIRLPOOL 
78149cdcc25dc478ae004b0a54b333edcad0268ce5e66efe9878b0bcaff0e33d227513f84040f3aa53967afa5ffc51ecef0e6003814c09925fdf9e6a4921d88a

diff --git a/dev-python/pytest/files/pytest-2.8.3-skip-test-on-pypy.patch 
b/dev-python/pytest/files/pytest-2.8.3-skip-test-on-pypy.patch
new file mode 100644
index 0000000..81a7573
--- /dev/null
+++ b/dev-python/pytest/files/pytest-2.8.3-skip-test-on-pypy.patch
@@ -0,0 +1,96 @@
+ testing/acceptance_test.py | 2 ++
+ testing/python/collect.py  | 1 +
+ testing/python/fixture.py  | 1 +
+ testing/python/metafunc.py | 1 +
+ testing/test_capture.py    | 3 ++-
+ testing/test_collection.py | 1 +
+ testing/test_junitxml.py   | 1 +
+ 7 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py
+index b9a3fa3..9db5017 100644
+--- a/testing/acceptance_test.py
++++ b/testing/acceptance_test.py
+@@ -209,6 +209,8 @@ class TestGeneralUsage:
+         result = testdir.runpython(p)
+         assert not result.ret
+ 
++    # https://github.com/pytest-dev/pytest/issues/1162
++    @pytest.mark.skipif('"__pypy__" in sys.modules')
+     def test_issue109_sibling_conftests_not_loaded(self, testdir):
+         sub1 = testdir.tmpdir.mkdir("sub1")
+         sub2 = testdir.tmpdir.mkdir("sub2")
+diff --git a/testing/python/collect.py b/testing/python/collect.py
+index 636f959..da9a291 100644
+--- a/testing/python/collect.py
++++ b/testing/python/collect.py
+@@ -659,6 +659,7 @@ class TestConftestCustomization:
+         l = modcol.collect()
+         assert '_hello' not in l
+ 
[email protected]('"__pypy__" in sys.modules')
+ def test_setup_only_available_in_subdir(testdir):
+     sub1 = testdir.mkpydir("sub1")
+     sub2 = testdir.mkpydir("sub2")
+diff --git a/testing/python/fixture.py b/testing/python/fixture.py
+index 2031764..f52cf85 100644
+--- a/testing/python/fixture.py
++++ b/testing/python/fixture.py
+@@ -83,6 +83,7 @@ class TestFillFixtures:
+             "*1 passed*"
+         ])
+ 
++    @pytest.mark.skipif('"__pypy__" in sys.modules')
+     def test_conftest_funcargs_only_available_in_subdir(self, testdir):
+         sub1 = testdir.mkpydir("sub1")
+         sub2 = testdir.mkpydir("sub2")
+diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py
+index 111ca61..bc489fa 100644
+--- a/testing/python/metafunc.py
++++ b/testing/python/metafunc.py
+@@ -835,6 +835,7 @@ class TestMetafuncFunctional:
+         reprec = testdir.runpytest()
+         reprec.assert_outcomes(passed=1)
+ 
++    @pytest.mark.skipif('"__pypy__" in sys.modules')
+     def test_generate_tests_only_done_in_subdir(self, testdir):
+         sub1 = testdir.mkpydir("sub1")
+         sub2 = testdir.mkpydir("sub2")
+diff --git a/testing/test_capture.py b/testing/test_capture.py
+index 5393335..d7448e1 100644
+--- a/testing/test_capture.py
++++ b/testing/test_capture.py
+@@ -478,7 +478,8 @@ class TestCaptureFixture:
+         result = testdir.runpytest_subprocess(p)
+         assert 'closed' not in result.stderr.str()
+ 
+-
++# https://github.com/pytest-dev/pytest/issues/1162
[email protected]('"__pypy__" in sys.modules')
+ def test_setup_failure_does_not_kill_capturing(testdir):
+     sub1 = testdir.mkpydir("sub1")
+     sub1.join("conftest.py").write(py.code.Source("""
+diff --git a/testing/test_collection.py b/testing/test_collection.py
+index 749c5b7..65370a6 100644
+--- a/testing/test_collection.py
++++ b/testing/test_collection.py
+@@ -287,6 +287,7 @@ class TestCustomConftests:
+             "*test_x*"
+         ])
+ 
++    @pytest.mark.skipif('"__pypy__" in sys.modules')
+     def test_pytest_collect_file_from_sister_dir(self, testdir):
+         sub1 = testdir.mkpydir("sub1")
+         sub2 = testdir.mkpydir("sub2")
+diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py
+index b25b6c7..3afd6f2 100644
+--- a/testing/test_junitxml.py
++++ b/testing/test_junitxml.py
+@@ -120,6 +120,7 @@ class TestPython:
+             classname="test_classname_instance.TestClass",
+             name="test_method")
+ 
++    @pytest.mark.skipif('"__pypy__" in sys.modules')
+     def test_classname_nested_dir(self, testdir):
+         p = testdir.tmpdir.ensure("sub", "test_hello.py")
+         p.write("def test_func(): 0/0")

diff --git a/dev-python/pytest/pytest-2.8.2.ebuild 
b/dev-python/pytest/pytest-2.8.2.ebuild
index b821c7a..7888429 100644
--- a/dev-python/pytest/pytest-2.8.2.ebuild
+++ b/dev-python/pytest/pytest-2.8.2.ebuild
@@ -36,6 +36,8 @@ DEPEND="${RDEPEND}
                dev-python/regendoc[${PYTHON_USEDEP}]
        )"
 
+PATCHES=( "${FILESDIR}"/${PN}-2.8.3-skip-test-on-pypy.patch )
+
 python_prepare_all() {
        chmod o-w *egg*/* || die
        # Disable versioning of py.test script to avoid collision with

diff --git a/dev-python/pytest/pytest-2.8.2.ebuild 
b/dev-python/pytest/pytest-2.8.3.ebuild
similarity index 86%
copy from dev-python/pytest/pytest-2.8.2.ebuild
copy to dev-python/pytest/pytest-2.8.3.ebuild
index b821c7a..2237c97 100644
--- a/dev-python/pytest/pytest-2.8.2.ebuild
+++ b/dev-python/pytest/pytest-2.8.3.ebuild
@@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh 
sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux 
~ppc-macos ~x64-macos ~x86-macos"
 IUSE="doc test"
 
 # When bumping, please check setup.py for the proper py version
@@ -36,6 +36,8 @@ DEPEND="${RDEPEND}
                dev-python/regendoc[${PYTHON_USEDEP}]
        )"
 
+PATCHES=( "${FILESDIR}"/${P}-skip-test-on-pypy.patch )
+
 python_prepare_all() {
        chmod o-w *egg*/* || die
        # Disable versioning of py.test script to avoid collision with
@@ -52,6 +54,9 @@ python_prepare_all() {
                -e 's:test_logging_initialized_in_test:_&:g' \
                -i testing/test_capture.py || die
 
+       find \( -name __pycache__ -o -name "*.pyc" -o -name "*.pyo" \) \
+               -exec rm -rvf '{}' + || die
+
        distutils-r1_python_prepare_all
 }
 

Reply via email to