Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest/files/, dev-python/pytest/
Date: Mon, 25 Jan 2016 15:12:40
Message-Id: 1453734701.a18f99daa15a9eddb4ec38067a39117649cd8cb0.jlec@gentoo
1 commit: a18f99daa15a9eddb4ec38067a39117649cd8cb0
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 25 12:29:18 2016 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 25 15:11:41 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a18f99da
7
8 dev-python/pytest: Version Bump
9
10 Package-Manager: portage-2.2.27
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 dev-python/pytest/Manifest | 1 +
14 .../files/pytest-2.8.7-skip-test-on-pypy.patch | 550 +++++++++++++++++++++
15 dev-python/pytest/pytest-2.8.7.ebuild | 76 +++
16 3 files changed, 627 insertions(+)
17
18 diff --git a/dev-python/pytest/Manifest b/dev-python/pytest/Manifest
19 index 3ef5574..acd5abd 100644
20 --- a/dev-python/pytest/Manifest
21 +++ b/dev-python/pytest/Manifest
22 @@ -3,3 +3,4 @@ DIST pytest-2.8.2.tar.gz 563955 SHA256 da2fc57320dd11f621d166634c52b989aa2291af1
23 DIST pytest-2.8.3.tar.gz 880441 SHA256 37d950e93c1fd7e04d816a3ca4a5226ea2531c6d531c8284ad9b88848417e720 SHA512 04dd9041729d83b98a15cef22aac65dfb95cd3bf6b71a580ff91e8738f9a1ad5ee46fae45c950342e4a0162e38c875299a46fc69ec74702f36a1e36ef76dc0d6 WHIRLPOOL 78149cdcc25dc478ae004b0a54b333edcad0268ce5e66efe9878b0bcaff0e33d227513f84040f3aa53967afa5ffc51ecef0e6003814c09925fdf9e6a4921d88a
24 DIST pytest-2.8.4.tar.gz 568888 SHA256 ca8afa5e216acfba6df7f26f2ef8a45baedf6a952e6b2f033ab55ec7e0a679eb SHA512 42e2949b66184cf2cecb7c803871639c1a3c887a48fc43580fe87f432507b9457c3a7c0b3bb620060e3eeb2db2178dfc35aba19022812497a917fdfa2ce5fd45 WHIRLPOOL 7ee539c61216463ccdaf5e09581cc1de82ffc6f6fb99dba04fa7d4eefb628c457c828ce9f8307477b5f95b997a4fd917f4818262ef4e1867cf0c10f9d2467bc2
25 DIST pytest-2.8.5.zip 664063 SHA256 44bb32fb3925b5a284ceee1af55e0a63d25436ec415232089403eed3a347667e SHA512 6489225732aa3b2130d5e533f9e013fc7cfeb820d43c341e0adefa2b397713366787d68461805b368a7c04dfeb421b5195ff96a44a9d10377b1da8b9760bdc8f WHIRLPOOL cd264e72db332163570641d7b7c5def59d0f3357697168a3418c50f0eb5461d5abdb17a7164bcd35c285a1221e4f51619029253c4eea18b327c45d2213ebcaad
26 +DIST pytest-2.8.7.tar.gz 564943 SHA256 fc4c86be54fce08e4b85b646a736efa18c6cde7599c1d2919f4f74629e018baf SHA512 c7f626ceb599811caeab4646389a2c489dd22d766c772d6ca686098cef9a11dca47ef41a4a4b811110f358bca1f1a678b549b2adfea48317ae70cf166289b371 WHIRLPOOL c3849f1a9f62c05c1ce20593f32ee513aee87853914be4099503cd47b068732df99605a0a4db9a3a7add4ef2a85f4d5376acf1a2e3f48f5d438433f200cb6196
27
28 diff --git a/dev-python/pytest/files/pytest-2.8.7-skip-test-on-pypy.patch b/dev-python/pytest/files/pytest-2.8.7-skip-test-on-pypy.patch
29 new file mode 100644
30 index 0000000..f82522f
31 --- /dev/null
32 +++ b/dev-python/pytest/files/pytest-2.8.7-skip-test-on-pypy.patch
33 @@ -0,0 +1,550 @@
34 + testing/acceptance_test.py | 5 +++++
35 + testing/python/collect.py | 3 +++
36 + testing/python/fixture.py | 14 ++++++++++++++
37 + testing/python/integration.py | 1 +
38 + testing/python/metafunc.py | 3 +++
39 + testing/test_assertion.py | 5 +++++
40 + testing/test_assertrewrite.py | 3 +++
41 + testing/test_capture.py | 6 ++++++
42 + testing/test_collection.py | 1 +
43 + testing/test_config.py | 3 +++
44 + testing/test_conftest.py | 3 +++
45 + testing/test_helpconfig.py | 1 +
46 + testing/test_junitxml.py | 1 +
47 + testing/test_mark.py | 1 +
48 + testing/test_monkeypatch.py | 1 +
49 + testing/test_skipping.py | 3 +++
50 + testing/test_terminal.py | 2 ++
51 + testing/test_unittest.py | 3 +++
52 + 18 files changed, 59 insertions(+)
53 +
54 +diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py
55 +index b9a3fa3..7875d94 100644
56 +--- a/testing/acceptance_test.py
57 ++++ b/testing/acceptance_test.py
58 +@@ -127,6 +127,7 @@ class TestGeneralUsage:
59 + "*ERROR: not found:*%s" %(p2.basename,)
60 + ])
61 +
62 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
63 + def test_issue486_better_reporting_on_conftest_load_failure(self, testdir):
64 + testdir.makepyfile("")
65 + testdir.makeconftest("import qwerty")
66 +@@ -209,6 +210,8 @@ class TestGeneralUsage:
67 + result = testdir.runpython(p)
68 + assert not result.ret
69 +
70 ++ # https://github.com/pytest-dev/pytest/issues/1162
71 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
72 + def test_issue109_sibling_conftests_not_loaded(self, testdir):
73 + sub1 = testdir.tmpdir.mkdir("sub1")
74 + sub2 = testdir.tmpdir.mkdir("sub2")
75 +@@ -350,6 +353,7 @@ class TestGeneralUsage:
76 + res = testdir.runpytest(p.basename)
77 + assert res.ret == 0
78 +
79 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
80 + def test_unknown_option(self, testdir):
81 + result = testdir.runpytest("--qwlkej")
82 + result.stderr.fnmatch_lines("""
83 +@@ -657,6 +661,7 @@ class TestDurations:
84 + ])
85 +
86 +
87 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
88 + class TestDurationWithFixture:
89 + source = """
90 + import time
91 +diff --git a/testing/python/collect.py b/testing/python/collect.py
92 +index bebc133..1cf0a80 100644
93 +--- a/testing/python/collect.py
94 ++++ b/testing/python/collect.py
95 +@@ -27,6 +27,7 @@ class TestModule:
96 + "*HINT*",
97 + ])
98 +
99 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
100 + def test_import_prepend_append(self, testdir, monkeypatch):
101 + syspath = list(sys.path)
102 + monkeypatch.setattr(sys, "path", syspath)
103 +@@ -57,6 +58,7 @@ class TestModule:
104 + pytest.raises(ImportError, lambda: modcol.obj)
105 +
106 + class TestClass:
107 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
108 + def test_class_with_init_warning(self, testdir):
109 + testdir.makepyfile("""
110 + class TestClass1:
111 +@@ -659,6 +661,7 @@ class TestConftestCustomization:
112 + l = modcol.collect()
113 + assert '_hello' not in l
114 +
115 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
116 + def test_setup_only_available_in_subdir(testdir):
117 + sub1 = testdir.mkpydir("sub1")
118 + sub2 = testdir.mkpydir("sub2")
119 +diff --git a/testing/python/fixture.py b/testing/python/fixture.py
120 +index 2031764..22e620a 100644
121 +--- a/testing/python/fixture.py
122 ++++ b/testing/python/fixture.py
123 +@@ -83,6 +83,7 @@ class TestFillFixtures:
124 + "*1 passed*"
125 + ])
126 +
127 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
128 + def test_conftest_funcargs_only_available_in_subdir(self, testdir):
129 + sub1 = testdir.mkpydir("sub1")
130 + sub2 = testdir.mkpydir("sub2")
131 +@@ -606,6 +607,7 @@ class TestRequestBasic:
132 + reprec = testdir.inline_run("-v")
133 + reprec.assertoutcome(passed=3)
134 +
135 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
136 + def test_fixtures_sub_subdir_normalize_sep(self, testdir):
137 + # this tests that normalization of nodeids takes place
138 + b = testdir.mkdir("tests").mkdir("unit")
139 +@@ -953,6 +955,7 @@ class TestFixtureUsages:
140 + "*2 passed*"
141 + ])
142 +
143 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
144 + def test_factory_uses_unknown_funcarg_as_dependency_error(self, testdir):
145 + testdir.makepyfile("""
146 + import pytest
147 +@@ -1049,6 +1052,7 @@ class TestFixtureUsages:
148 + reprec = testdir.inline_run()
149 + reprec.assertoutcome(passed=2)
150 +
151 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
152 + def test_usefixtures_seen_in_showmarkers(self, testdir):
153 + result = testdir.runpytest("--markers")
154 + result.stdout.fnmatch_lines("""
155 +@@ -1157,6 +1161,7 @@ class TestFixtureManagerParseFactories:
156 + reprec = testdir.inline_run("-s")
157 + reprec.assertoutcome(passed=1)
158 +
159 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
160 + def test_parsefactories_relative_node_ids(self, testdir):
161 + # example mostly taken from:
162 + # https://mail.python.org/pipermail/pytest-dev/2014-September/002617.html
163 +@@ -1305,6 +1310,7 @@ class TestAutouseDiscovery:
164 + reprec = testdir.inline_run("-s")
165 + reprec.assertoutcome(failed=0, passed=0)
166 +
167 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
168 + def test_autouse_in_conftests(self, testdir):
169 + a = testdir.mkdir("a")
170 + b = testdir.mkdir("a1")
171 +@@ -1890,6 +1896,7 @@ class TestFixtureMarker:
172 + l = reprec.getcalls("pytest_runtest_call")[0].item.module.l
173 + assert l == [1,1,2,2]
174 +
175 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
176 + def test_module_parametrized_ordering(self, testdir):
177 + testdir.makeconftest("""
178 + import pytest
179 +@@ -1936,6 +1943,7 @@ class TestFixtureMarker:
180 + test_mod1.py::test_func1[m2] PASSED
181 + """)
182 +
183 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
184 + def test_class_ordering(self, testdir):
185 + testdir.makeconftest("""
186 + import pytest
187 +@@ -1984,6 +1992,7 @@ class TestFixtureMarker:
188 + test_class_ordering.py::TestClass::test_3[2-b] PASSED
189 + """)
190 +
191 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
192 + def test_parametrize_separated_order_higher_scope_first(self, testdir):
193 + testdir.makepyfile("""
194 + import pytest
195 +@@ -2028,6 +2037,7 @@ class TestFixtureMarker:
196 + pprint.pprint(list(zip(l, expected)))
197 + assert l == expected
198 +
199 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
200 + def test_parametrized_fixture_teardown_order(self, testdir):
201 + testdir.makepyfile("""
202 + import pytest
203 +@@ -2065,6 +2075,7 @@ class TestFixtureMarker:
204 + """)
205 + assert "error" not in result.stdout.str()
206 +
207 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
208 + def test_fixture_finalizer(self, testdir):
209 + testdir.makeconftest("""
210 + import pytest
211 +@@ -2385,6 +2396,7 @@ class TestErrors:
212 + "*1 error*",
213 + ])
214 +
215 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
216 + def test_issue498_fixture_finalizer_failing(self, testdir):
217 + testdir.makepyfile("""
218 + import pytest
219 +@@ -2431,6 +2443,7 @@ class TestErrors:
220 + "*1 error*",
221 + ])
222 +
223 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
224 + class TestShowFixtures:
225 + def test_funcarg_compat(self, testdir):
226 + config = testdir.parseconfigure("--funcargs")
227 +@@ -2561,6 +2574,7 @@ class TestShowFixtures:
228 + """)
229 +
230 +
231 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
232 + class TestContextManagerFixtureFuncs:
233 + def test_simple(self, testdir):
234 + testdir.makepyfile("""
235 +diff --git a/testing/python/integration.py b/testing/python/integration.py
236 +index 0c436e3..1d0b4ee 100644
237 +--- a/testing/python/integration.py
238 ++++ b/testing/python/integration.py
239 +@@ -202,6 +202,7 @@ class TestMockDecoration:
240 +
241 +
242 + class TestReRunTests:
243 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
244 + def test_rerun(self, testdir):
245 + testdir.makeconftest("""
246 + from _pytest.runner import runtestprotocol
247 +diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py
248 +index 111ca61..cd2e86d 100644
249 +--- a/testing/python/metafunc.py
250 ++++ b/testing/python/metafunc.py
251 +@@ -475,6 +475,7 @@ class TestMetafunc:
252 + reprec = testdir.inline_run()
253 + reprec.assertoutcome(passed=2)
254 +
255 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
256 + def test_parametrize_class_scenarios(self, testdir):
257 + testdir.makepyfile("""
258 + # same as doc/en/example/parametrize scenario example
259 +@@ -766,6 +767,7 @@ class TestMetafuncFunctional:
260 + "*test_function*advanced*FAILED",
261 + ])
262 +
263 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
264 + def test_parametrize_without_ids(self, testdir):
265 + testdir.makepyfile("""
266 + import pytest
267 +@@ -835,6 +837,7 @@ class TestMetafuncFunctional:
268 + reprec = testdir.runpytest()
269 + reprec.assert_outcomes(passed=1)
270 +
271 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
272 + def test_generate_tests_only_done_in_subdir(self, testdir):
273 + sub1 = testdir.mkpydir("sub1")
274 + sub2 = testdir.mkpydir("sub2")
275 +diff --git a/testing/test_assertion.py b/testing/test_assertion.py
276 +index 914fedd..fb0d0e2 100644
277 +--- a/testing/test_assertion.py
278 ++++ b/testing/test_assertion.py
279 +@@ -120,6 +120,7 @@ class TestAssert_reprcompare:
280 + """)
281 + ]
282 + )
283 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
284 + def test_iterable_full_diff(self, left, right, expected):
285 + """Test the full diff assertion failure explanation.
286 +
287 +@@ -348,6 +349,7 @@ class TestFormatExplanation:
288 + assert util.format_explanation(expl) == res
289 +
290 +
291 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
292 + def test_python25_compile_issue257(testdir):
293 + testdir.makepyfile("""
294 + def test_rewritten():
295 +@@ -559,6 +561,7 @@ def test_warn_missing(testdir):
296 + "*WARNING*assert statements are not executed*",
297 + ])
298 +
299 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
300 + def test_recursion_source_decode(testdir):
301 + testdir.makepyfile("""
302 + def test_something():
303 +@@ -573,6 +576,7 @@ def test_recursion_source_decode(testdir):
304 + <Module*>
305 + """)
306 +
307 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
308 + def test_AssertionError_message(testdir):
309 + testdir.makepyfile("""
310 + def test_hello():
311 +@@ -587,6 +591,7 @@ def test_AssertionError_message(testdir):
312 + """)
313 +
314 + @pytest.mark.skipif(PY3, reason='This bug does not exist on PY3')
315 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
316 + def test_set_with_unsortable_elements():
317 + # issue #718
318 + class UnsortableKey(object):
319 +diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py
320 +index 544250a..9dad082 100644
321 +--- a/testing/test_assertrewrite.py
322 ++++ b/testing/test_assertrewrite.py
323 +@@ -307,6 +307,7 @@ class TestAssertionRewrite:
324 + assert g(**{x : 2})
325 + assert getmsg(f, ns) == """assert g(**{'a': 2})"""
326 +
327 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
328 + def test_attribute(self):
329 + class X(object):
330 + g = 3
331 +@@ -343,6 +344,7 @@ class TestAssertionRewrite:
332 + assert b < c
333 + getmsg(f, must_pass=True)
334 +
335 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
336 + def test_len(self):
337 + def f():
338 + l = list(range(10))
339 +@@ -641,6 +643,7 @@ class TestAssertionRewriteHookDetails(object):
340 +
341 + assert _read_pyc(source, str(pyc)) is None # no error
342 +
343 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
344 + def test_reload_is_same(self, testdir):
345 + # A file that will be picked up during collecting.
346 + testdir.tmpdir.join("file.py").ensure()
347 +diff --git a/testing/test_capture.py b/testing/test_capture.py
348 +index 5393335..0d2c238 100644
349 +--- a/testing/test_capture.py
350 ++++ b/testing/test_capture.py
351 +@@ -479,6 +479,8 @@ class TestCaptureFixture:
352 + assert 'closed' not in result.stderr.str()
353 +
354 +
355 ++# https://github.com/pytest-dev/pytest/issues/1162
356 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
357 + def test_setup_failure_does_not_kill_capturing(testdir):
358 + sub1 = testdir.mkpydir("sub1")
359 + sub1.join("conftest.py").write(py.code.Source("""
360 +@@ -518,6 +520,7 @@ def test_capture_conftest_runtest_setup(testdir):
361 + assert 'hello19' not in result.stdout.str()
362 +
363 +
364 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
365 + def test_capture_badoutput_issue412(testdir):
366 + testdir.makepyfile("""
367 + import os
368 +@@ -897,6 +900,7 @@ class TestStdCaptureFD(TestStdCapture):
369 + pytestmark = needsosdup
370 + captureclass = staticmethod(StdCaptureFD)
371 +
372 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
373 + def test_simple_only_fd(self, testdir):
374 + testdir.makepyfile("""
375 + import os
376 +@@ -981,6 +985,7 @@ def test_fdcapture_tmpfile_remains_the_same(tmpfile, use):
377 + assert capfile2 == capfile
378 +
379 + @needsosdup
380 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
381 + def test_close_and_capture_again(testdir):
382 + testdir.makepyfile("""
383 + import os
384 +@@ -1001,6 +1006,7 @@ def test_close_and_capture_again(testdir):
385 +
386 +
387 + @pytest.mark.parametrize('method', ['SysCapture', 'FDCapture'])
388 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
389 + def test_capturing_and_logging_fundamentals(testdir, method):
390 + if method == "StdCaptureFD" and not hasattr(os, 'dup'):
391 + pytest.skip("need os.dup")
392 +diff --git a/testing/test_collection.py b/testing/test_collection.py
393 +index 749c5b7..65370a6 100644
394 +--- a/testing/test_collection.py
395 ++++ b/testing/test_collection.py
396 +@@ -287,6 +287,7 @@ class TestCustomConftests:
397 + "*test_x*"
398 + ])
399 +
400 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
401 + def test_pytest_collect_file_from_sister_dir(self, testdir):
402 + sub1 = testdir.mkpydir("sub1")
403 + sub2 = testdir.mkpydir("sub2")
404 +diff --git a/testing/test_config.py b/testing/test_config.py
405 +index d497200..2987072 100644
406 +--- a/testing/test_config.py
407 ++++ b/testing/test_config.py
408 +@@ -47,6 +47,7 @@ class TestParseIni:
409 + ])
410 +
411 + @pytest.mark.parametrize("name", "setup.cfg tox.ini pytest.ini".split())
412 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
413 + def test_ini_names(self, testdir, name):
414 + testdir.tmpdir.join(name).write(py.std.textwrap.dedent("""
415 + [pytest]
416 +@@ -55,6 +56,7 @@ class TestParseIni:
417 + config = testdir.parseconfig()
418 + assert config.getini("minversion") == "1.0"
419 +
420 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
421 + def test_toxini_before_lower_pytestini(self, testdir):
422 + sub = testdir.tmpdir.mkdir("sub")
423 + sub.join("tox.ini").write(py.std.textwrap.dedent("""
424 +@@ -418,6 +420,7 @@ class TestWarning:
425 + reprec = testdir.inline_run()
426 + reprec.assertoutcome(passed=1)
427 +
428 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
429 + def test_warn_on_test_item_from_request(self, testdir):
430 + testdir.makepyfile("""
431 + import pytest
432 +diff --git a/testing/test_conftest.py b/testing/test_conftest.py
433 +index a0b77cf..3d07597 100644
434 +--- a/testing/test_conftest.py
435 ++++ b/testing/test_conftest.py
436 +@@ -204,6 +204,7 @@ def test_conftest_import_order(testdir, monkeypatch):
437 + assert conftest._getconftestmodules(sub) == [ct1, ct2]
438 +
439 +
440 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
441 + def test_fixture_dependency(testdir, monkeypatch):
442 + ct1 = testdir.makeconftest("")
443 + ct1 = testdir.makepyfile("__init__.py")
444 +@@ -241,6 +242,7 @@ def test_fixture_dependency(testdir, monkeypatch):
445 + result.stdout.fnmatch_lines(["*1 passed*"])
446 +
447 +
448 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
449 + def test_conftest_found_with_double_dash(testdir):
450 + sub = testdir.mkdir("sub")
451 + sub.join("conftest.py").write(py.std.textwrap.dedent("""
452 +@@ -259,6 +261,7 @@ def test_conftest_found_with_double_dash(testdir):
453 + """)
454 +
455 +
456 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
457 + class TestConftestVisibility:
458 + def _setup_tree(self, testdir): # for issue616
459 + # example mostly taken from:
460 +diff --git a/testing/test_helpconfig.py b/testing/test_helpconfig.py
461 +index 9f8d87b..2ecd20d 100644
462 +--- a/testing/test_helpconfig.py
463 ++++ b/testing/test_helpconfig.py
464 +@@ -14,6 +14,7 @@ def test_version(testdir, pytestconfig):
465 + "*at*",
466 + ])
467 +
468 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
469 + def test_help(testdir):
470 + result = testdir.runpytest("--help")
471 + assert result.ret == 0
472 +diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py
473 +index e6db810..1180ea7 100644
474 +--- a/testing/test_junitxml.py
475 ++++ b/testing/test_junitxml.py
476 +@@ -175,6 +175,7 @@ class TestPython:
477 + classname="test_classname_instance.TestClass",
478 + name="test_method")
479 +
480 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
481 + def test_classname_nested_dir(self, testdir):
482 + p = testdir.tmpdir.ensure("sub", "test_hello.py")
483 + p.write("def test_func(): 0/0")
484 +diff --git a/testing/test_mark.py b/testing/test_mark.py
485 +index 1aa3361..242a65d 100644
486 +--- a/testing/test_mark.py
487 ++++ b/testing/test_mark.py
488 +@@ -133,6 +133,7 @@ def test_markers_option(testdir):
489 + "*a1some*another marker",
490 + ])
491 +
492 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
493 + def test_markers_option_with_plugin_in_current_dir(testdir):
494 + testdir.makeconftest('pytest_plugins = "flip_flop"')
495 + testdir.makepyfile(flip_flop="""\
496 +diff --git a/testing/test_monkeypatch.py b/testing/test_monkeypatch.py
497 +index 048c942..0c87b4e 100644
498 +--- a/testing/test_monkeypatch.py
499 ++++ b/testing/test_monkeypatch.py
500 +@@ -256,6 +256,7 @@ def test_chdir_double_undo(mp, tmpdir):
501 + assert os.getcwd() == tmpdir.strpath
502 +
503 +
504 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
505 + def test_issue185_time_breaks(testdir):
506 + testdir.makepyfile("""
507 + import time
508 +diff --git a/testing/test_skipping.py b/testing/test_skipping.py
509 +index 1048c94..ea5cf44 100644
510 +--- a/testing/test_skipping.py
511 ++++ b/testing/test_skipping.py
512 +@@ -263,6 +263,7 @@ class TestXFail:
513 + result = testdir.runpytest(p, "--runxfail")
514 + result.stdout.fnmatch_lines("*1 pass*")
515 +
516 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
517 + def test_xfail_imperative_in_setup_function(self, testdir):
518 + p = testdir.makepyfile("""
519 + import pytest
520 +@@ -671,6 +672,7 @@ def test_xfail_test_setup_exception(testdir):
521 + assert 'xfailed' in result.stdout.str()
522 + assert 'xpassed' not in result.stdout.str()
523 +
524 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
525 + def test_imperativeskip_on_xfail_test(testdir):
526 + testdir.makepyfile("""
527 + import pytest
528 +@@ -694,6 +696,7 @@ def test_imperativeskip_on_xfail_test(testdir):
529 + *2 skipped*
530 + """)
531 +
532 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
533 + class TestBooleanCondition:
534 + def test_skipif(self, testdir):
535 + testdir.makepyfile("""
536 +diff --git a/testing/test_terminal.py b/testing/test_terminal.py
537 +index 305d60a..d503be8 100644
538 +--- a/testing/test_terminal.py
539 ++++ b/testing/test_terminal.py
540 +@@ -264,6 +264,7 @@ class TestCollectonly:
541 + "* <Function 'test_method'*>",
542 + ])
543 +
544 ++ @pytest.mark.skipif('"__pypy__" in sys.modules')
545 + def test_collectonly_error(self, testdir):
546 + p = testdir.makepyfile("import Errlkjqweqwe")
547 + result = testdir.runpytest("--collect-only", p)
548 +@@ -726,6 +727,7 @@ def test_tbstyle_native_setup_error(testdir):
549 + '*File *test_tbstyle_native_setup_error.py", line *, in setup_error_fixture*'
550 + ])
551 +
552 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
553 + def test_terminal_summary(testdir):
554 + testdir.makeconftest("""
555 + def pytest_terminal_summary(terminalreporter):
556 +diff --git a/testing/test_unittest.py b/testing/test_unittest.py
557 +index 53dde6e..52eeae0 100644
558 +--- a/testing/test_unittest.py
559 ++++ b/testing/test_unittest.py
560 +@@ -14,6 +14,7 @@ def test_simple_unittest(testdir):
561 + assert reprec.matchreport("testpassing").passed
562 + assert reprec.matchreport("test_failing").failed
563 +
564 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
565 + def test_runTest_method(testdir):
566 + testdir.makepyfile("""
567 + import unittest
568 +@@ -705,6 +706,7 @@ def test_issue333_result_clearing(testdir):
569 + reprec.assertoutcome(failed=1)
570 +
571 + @pytest.mark.skipif("sys.version_info < (2,7)")
572 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
573 + def test_unittest_raise_skip_issue748(testdir):
574 + testdir.makepyfile(test_foo="""
575 + import unittest
576 +@@ -720,6 +722,7 @@ def test_unittest_raise_skip_issue748(testdir):
577 + """)
578 +
579 + @pytest.mark.skipif("sys.version_info < (2,7)")
580 ++@×××××××××××.skipif('"__pypy__" in sys.modules')
581 + def test_unittest_skip_issue1169(testdir):
582 + testdir.makepyfile(test_foo="""
583 + import unittest
584
585 diff --git a/dev-python/pytest/pytest-2.8.7.ebuild b/dev-python/pytest/pytest-2.8.7.ebuild
586 new file mode 100644
587 index 0000000..a8487c5
588 --- /dev/null
589 +++ b/dev-python/pytest/pytest-2.8.7.ebuild
590 @@ -0,0 +1,76 @@
591 +# Copyright 1999-2016 Gentoo Foundation
592 +# Distributed under the terms of the GNU General Public License v2
593 +# $Id$
594 +
595 +EAPI=5
596 +
597 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
598 +
599 +inherit distutils-r1
600 +
601 +DESCRIPTION="Simple powerful testing with Python"
602 +HOMEPAGE="http://pytest.org/ https://pypi.python.org/pypi/pytest"
603 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
604 +
605 +LICENSE="MIT"
606 +SLOT="0"
607 +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"
608 +IUSE="doc test"
609 +
610 +# When bumping, please check setup.py for the proper py version
611 +PY_VER="1.4.29"
612 +RDEPEND=">=dev-python/py-${PY_VER}[${PYTHON_USEDEP}]"
613 +
614 +# dev-python/pluggy
615 +# https://github.com/hpk42/pluggy
616 +# See https://github.com/pytest-dev/pytest/issues/944
617 +# for why not now
618 +
619 +#pexpect dep based on https://bitbucket.org/hpk42/pytest/issue/386/tests-fail-with-pexpect-30
620 +DEPEND="${RDEPEND}
621 + dev-python/setuptools[${PYTHON_USEDEP}]
622 + test? ( dev-python/pexpect[${PYTHON_USEDEP}] )
623 + doc? (
624 + >=dev-python/sphinx-1.2.3[${PYTHON_USEDEP}]
625 + dev-python/pyyaml[${PYTHON_USEDEP}]
626 + dev-python/regendoc[${PYTHON_USEDEP}]
627 + )"
628 +
629 +PATCHES=( "${FILESDIR}"/${P}-skip-test-on-pypy.patch )
630 +
631 +python_prepare_all() {
632 + chmod o-w *egg*/* || die
633 + # Disable versioning of py.test script to avoid collision with
634 + # versioning performed by the eclass.
635 + sed -e "s/return points/return {'py.test': target}/" -i setup.py || die "sed failed"
636 + grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency"
637 +
638 + # Prevent un-needed d'loading
639 + sed -e "s/'sphinx.ext.intersphinx', //" -i doc/en/conf.py || die
640 +
641 + distutils-r1_python_prepare_all
642 +}
643 +
644 +python_compile_all() {
645 + if use doc; then
646 + mkdir doc/en/.build || die
647 + emake -C doc/en html
648 + fi
649 +}
650 +
651 +python_test() {
652 + # test_nose.py not written to suit py3.2 in pypy3
653 + if [[ "${EPYTHON}" == pypy3 ]]; then
654 + "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py -x -v \
655 + --ignore=testing/BUILD_nose.py \
656 + || die "tests failed with ${EPYTHON}"
657 + else
658 + "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py -x -v --runpytest=subprocess \
659 + || die "tests failed with ${EPYTHON}"
660 + fi
661 +}
662 +
663 +python_install_all() {
664 + use doc && HTML_DOCS=( doc/en/_build/html/. )
665 + distutils-r1_python_install_all
666 +}