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