Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: tests/checks/
Date: Sat, 26 Nov 2022 11:47:36
Message-Id: 1669317378.db8b25f64563e66565614e4d7ce69f64d3f41f51.arthurzam@gentoo
1 commit: db8b25f64563e66565614e4d7ce69f64d3f41f51
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 24 19:16:18 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 24 19:16:18 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=db8b25f6
7
8 PythonCheck: replace obsolete 2_7 target with 3_5 in tests
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 tests/checks/test_python.py | 182 ++++++++++++++++++++++----------------------
13 1 file changed, 91 insertions(+), 91 deletions(-)
14
15 diff --git a/tests/checks/test_python.py b/tests/checks/test_python.py
16 index dd32147e..ec48a378 100644
17 --- a/tests/checks/test_python.py
18 +++ b/tests/checks/test_python.py
19 @@ -128,39 +128,39 @@ class TestPythonCheck(misc.ReportTestCase):
20 self.check,
21 self.mk_pkg(
22 _eclasses_=['python-r1'],
23 - IUSE='python_targets_python2_7 '
24 + IUSE='python_targets_python3_5 '
25 'python_targets_python3_6',
26 - RDEPEND='python_targets_python2_7? ( '
27 - ' dev-lang/python:2.7 ) '
28 + RDEPEND='python_targets_python3_5? ( '
29 + ' dev-lang/python:3.5 ) '
30 'python_targets_python3_6? ( '
31 ' dev-lang/python:3.6 )',
32 - REQUIRED_USE='|| ( python_targets_python2_7 '
33 + REQUIRED_USE='|| ( python_targets_python3_5 '
34 ' python_targets_python3_6 )'))
35
36 # python-single-r1 with one implementation does not use PST
37 self.assertNoReport(
38 self.check,
39 self.mk_pkg(_eclasses_=['python-single-r1'],
40 - IUSE='python_targets_python2_7',
41 - RDEPEND='python_targets_python2_7? ( '
42 - ' dev-lang/python:2.7 )',
43 - REQUIRED_USE='python_targets_python2_7'))
44 + IUSE='python_targets_python3_5',
45 + RDEPEND='python_targets_python3_5? ( '
46 + ' dev-lang/python:3.5 )',
47 + REQUIRED_USE='python_targets_python3_5'))
48 self.assertNoReport(
49 self.check,
50 self.mk_pkg(
51 _eclasses_=['python-single-r1'],
52 - IUSE='python_targets_python2_7 '
53 + IUSE='python_targets_python3_5 '
54 'python_targets_python3_6 '
55 - 'python_single_target_python2_7 '
56 + 'python_single_target_python3_5 '
57 'python_single_target_python3_6',
58 - RDEPEND='python_single_target_python2_7? ( '
59 - ' dev-lang/python:2.7 ) '
60 + RDEPEND='python_single_target_python3_5? ( '
61 + ' dev-lang/python:3.5 ) '
62 'python_single_target_python3_6? ( '
63 ' dev-lang/python:3.6 )',
64 - REQUIRED_USE='^^ ( python_single_target_python2_7 '
65 + REQUIRED_USE='^^ ( python_single_target_python3_5 '
66 ' python_single_target_python3_6 ) '
67 - 'python_single_target_python2_7? ( '
68 - ' python_targets_python2_7 ) '
69 + 'python_single_target_python3_5? ( '
70 + ' python_targets_python3_5 ) '
71 'python_single_target_python3_6? ( '
72 ' python_targets_python3_6 )'))
73
74 @@ -168,16 +168,16 @@ class TestPythonCheck(misc.ReportTestCase):
75 self.check,
76 self.mk_pkg(_eclasses_=['python-any-r1'],
77 DEPEND='|| ( '
78 - ' dev-lang/python:2.7 '
79 + ' dev-lang/python:3.5 '
80 ' dev-lang/python:3.6 )'))
81 self.assertNoReport(
82 self.check,
83 - self.mk_pkg(_eclasses_=['python-any-r1'], DEPEND='dev-lang/python:2.7'))
84 + self.mk_pkg(_eclasses_=['python-any-r1'], DEPEND='dev-lang/python:3.5'))
85 self.assertNoReport(
86 self.check,
87 self.mk_pkg(_eclasses_=['python-any-r1'],
88 BDEPEND='|| ( '
89 - ' dev-lang/python:2.7 '
90 + ' dev-lang/python:3.5 '
91 ' dev-lang/python:3.6 )'))
92
93 def test_missing_required_use(self):
94 @@ -185,10 +185,10 @@ class TestPythonCheck(misc.ReportTestCase):
95 self.check,
96 self.mk_pkg(
97 _eclasses_=['python-r1'],
98 - IUSE='python_targets_python2_7 '
99 + IUSE='python_targets_python3_5 '
100 'python_targets_python3_6',
101 - RDEPEND='python_targets_python2_7? ( '
102 - ' dev-lang/python:2.7 ) '
103 + RDEPEND='python_targets_python3_5? ( '
104 + ' dev-lang/python:3.5 ) '
105 'python_targets_python3_6? ( '
106 ' dev-lang/python:3.6 )'))
107 assert isinstance(r, python.PythonMissingRequiredUse)
108 @@ -200,13 +200,13 @@ class TestPythonCheck(misc.ReportTestCase):
109 self.check,
110 self.mk_pkg(
111 _eclasses_=['python-r1'],
112 - IUSE='python_targets_python2_7 '
113 + IUSE='python_targets_python3_5 '
114 'python_targets_python3_6',
115 - RDEPEND='python_targets_python2_7? ( '
116 - ' dev-lang/python:2.7 ) '
117 + RDEPEND='python_targets_python3_5? ( '
118 + ' dev-lang/python:3.5 ) '
119 'python_targets_python3_6? ( '
120 ' dev-lang/python:3.6 )',
121 - REQUIRED_USE='|| ( python_targets_python2_7 )')),
122 + REQUIRED_USE='|| ( python_targets_python3_5 )')),
123 python.PythonMissingRequiredUse)
124
125 assert isinstance(
126 @@ -214,11 +214,11 @@ class TestPythonCheck(misc.ReportTestCase):
127 self.check,
128 self.mk_pkg(
129 _eclasses_=['python-r1'],
130 - IUSE='python_targets_python2_7 '
131 + IUSE='python_targets_python3_5 '
132 'python_targets_python3_6 '
133 'python_targets_python3_7',
134 - RDEPEND='python_targets_python2_7? ( '
135 - ' dev-lang/python:2.7 ) '
136 + RDEPEND='python_targets_python3_5? ( '
137 + ' dev-lang/python:3.5 ) '
138 'python_targets_python3_6? ( '
139 ' dev-lang/python:3.6 ) '
140 'python_targets_python3_7? ( '
141 @@ -232,12 +232,12 @@ class TestPythonCheck(misc.ReportTestCase):
142 self.check,
143 self.mk_pkg(
144 _eclasses_=['python-single-r1'],
145 - IUSE='python_targets_python2_7 '
146 + IUSE='python_targets_python3_5 '
147 'python_targets_python3_6 '
148 - 'python_single_target_python2_7 '
149 + 'python_single_target_python3_5 '
150 'python_single_target_python3_6',
151 - RDEPEND='python_single_target_python2_7? ( '
152 - ' dev-lang/python:2.7 ) '
153 + RDEPEND='python_single_target_python3_5? ( '
154 + ' dev-lang/python:3.5 ) '
155 'python_single_target_python3_6? ( '
156 ' dev-lang/python:3.6 )')),
157 python.PythonMissingRequiredUse)
158 @@ -248,15 +248,15 @@ class TestPythonCheck(misc.ReportTestCase):
159 self.check,
160 self.mk_pkg(
161 _eclasses_=['python-single-r1'],
162 - IUSE='python_targets_python2_7 '
163 + IUSE='python_targets_python3_5 '
164 'python_targets_python3_6 '
165 - 'python_single_target_python2_7 '
166 + 'python_single_target_python3_5 '
167 'python_single_target_python3_6',
168 - RDEPEND='python_single_target_python2_7? ( '
169 - ' dev-lang/python:2.7 ) '
170 + RDEPEND='python_single_target_python3_5? ( '
171 + ' dev-lang/python:3.5 ) '
172 'python_single_target_python3_6? ( '
173 ' dev-lang/python:3.6 )',
174 - REQUIRED_USE='^^ ( python_single_target_python2_7 )')),
175 + REQUIRED_USE='^^ ( python_single_target_python3_5 )')),
176 python.PythonMissingRequiredUse)
177
178 # || instead of ^^ in python-single-r1
179 @@ -265,15 +265,15 @@ class TestPythonCheck(misc.ReportTestCase):
180 self.check,
181 self.mk_pkg(
182 _eclasses_=['python-single-r1'],
183 - IUSE='python_targets_python2_7 '
184 + IUSE='python_targets_python3_5 '
185 'python_targets_python3_6 '
186 - 'python_single_target_python2_7 '
187 + 'python_single_target_python3_5 '
188 'python_single_target_python3_6',
189 - RDEPEND='python_single_target_python2_7? ( '
190 - ' dev-lang/python:2.7 ) '
191 + RDEPEND='python_single_target_python3_5? ( '
192 + ' dev-lang/python:3.5 ) '
193 'python_single_target_python3_6? ( '
194 ' dev-lang/python:3.6 )',
195 - REQUIRED_USE='|| ( python_targets_python2_7 '
196 + REQUIRED_USE='|| ( python_targets_python3_5 '
197 ' python_targets_python3_6 )')),
198 python.PythonMissingRequiredUse)
199
200 @@ -282,9 +282,9 @@ class TestPythonCheck(misc.ReportTestCase):
201 self.check,
202 self.mk_pkg(
203 _eclasses_=['python-r1'],
204 - IUSE='python_targets_python2_7 '
205 + IUSE='python_targets_python3_5 '
206 'python_targets_python3_6',
207 - REQUIRED_USE='|| ( python_targets_python2_7 '
208 + REQUIRED_USE='|| ( python_targets_python3_5 '
209 ' python_targets_python3_6 )'))
210 assert isinstance(r, python.PythonMissingDeps)
211 assert 'missing RDEPEND="${PYTHON_DEPS}"' in str(r)
212 @@ -294,11 +294,11 @@ class TestPythonCheck(misc.ReportTestCase):
213 self.check,
214 self.mk_pkg(
215 _eclasses_=['python-r1'],
216 - IUSE='python_targets_python2_7 '
217 + IUSE='python_targets_python3_5 '
218 'python_targets_python3_6',
219 - RDEPEND='python_targets_python2_7? ( '
220 - ' dev-lang/python:2.7 )',
221 - REQUIRED_USE='|| ( python_targets_python2_7 '
222 + RDEPEND='python_targets_python3_5? ( '
223 + ' dev-lang/python:3.5 )',
224 + REQUIRED_USE='|| ( python_targets_python3_5 '
225 ' python_targets_python3_6 )'))
226 assert isinstance(r, python.PythonMissingDeps)
227 assert 'missing RDEPEND="${PYTHON_DEPS}"' in str(r)
228 @@ -310,13 +310,13 @@ class TestPythonCheck(misc.ReportTestCase):
229 self.check,
230 self.mk_pkg(
231 _eclasses_=['python-r1'],
232 - IUSE='python_targets_python2_7 '
233 + IUSE='python_targets_python3_5 '
234 'python_targets_python3_6',
235 - RDEPEND='python_targets_python2_7? ( '
236 + RDEPEND='python_targets_python3_5? ( '
237 ' dev-foo/bar ) '
238 'python_targets_python3_6? ( '
239 ' dev-lang/python:3.6 )',
240 - REQUIRED_USE='|| ( python_targets_python2_7 '
241 + REQUIRED_USE='|| ( python_targets_python3_5 '
242 ' python_targets_python3_6 )')),
243 python.PythonMissingDeps)
244
245 @@ -326,13 +326,13 @@ class TestPythonCheck(misc.ReportTestCase):
246 self.check,
247 self.mk_pkg(
248 _eclasses_=['python-r1'],
249 - IUSE='python_targets_python2_7 '
250 + IUSE='python_targets_python3_5 '
251 'python_targets_python3_6',
252 - DEPEND='python_targets_python2_7? ( '
253 - ' dev-lang/python:2.7 ) '
254 + DEPEND='python_targets_python3_5? ( '
255 + ' dev-lang/python:3.5 ) '
256 'python_targets_python3_6? ( '
257 ' dev-lang/python:3.6 )',
258 - REQUIRED_USE='|| ( python_targets_python2_7 '
259 + REQUIRED_USE='|| ( python_targets_python3_5 '
260 ' python_targets_python3_6 )')),
261 python.PythonMissingDeps)
262
263 @@ -341,14 +341,14 @@ class TestPythonCheck(misc.ReportTestCase):
264 self.check,
265 self.mk_pkg(
266 _eclasses_=['python-single-r1'],
267 - IUSE='python_targets_python2_7 '
268 + IUSE='python_targets_python3_5 '
269 'python_targets_python3_6 '
270 - 'python_single_target_python2_7 '
271 + 'python_single_target_python3_5 '
272 'python_single_target_python3_6',
273 - REQUIRED_USE='^^ ( python_single_target_python2_7 '
274 + REQUIRED_USE='^^ ( python_single_target_python3_5 '
275 ' python_single_target_python3_6 ) '
276 - 'python_single_target_python2_7? ( '
277 - ' python_targets_python2_7 ) '
278 + 'python_single_target_python3_5? ( '
279 + ' python_targets_python3_5 ) '
280 'python_single_target_python3_6? ( '
281 ' python_targets_python3_6 )')),
282 python.PythonMissingDeps)
283 @@ -359,16 +359,16 @@ class TestPythonCheck(misc.ReportTestCase):
284 self.check,
285 self.mk_pkg(
286 _eclasses_=['python-single-r1'],
287 - IUSE='python_targets_python2_7 '
288 + IUSE='python_targets_python3_5 '
289 'python_targets_python3_6 '
290 - 'python_single_target_python2_7 '
291 + 'python_single_target_python3_5 '
292 'python_single_target_python3_6',
293 - RDEPEND='python_single_target_python2_7? ( '
294 - ' dev-lang/python:2.7 )',
295 - REQUIRED_USE='^^ ( python_single_target_python2_7 '
296 + RDEPEND='python_single_target_python3_5? ( '
297 + ' dev-lang/python:3.5 )',
298 + REQUIRED_USE='^^ ( python_single_target_python3_5 '
299 ' python_single_target_python3_6 ) '
300 - 'python_single_target_python2_7? ( '
301 - ' python_targets_python2_7 ) '
302 + 'python_single_target_python3_5? ( '
303 + ' python_targets_python3_5 ) '
304 'python_single_target_python3_6? ( '
305 ' python_targets_python3_6 )')),
306 python.PythonMissingDeps)
307 @@ -380,18 +380,18 @@ class TestPythonCheck(misc.ReportTestCase):
308 self.check,
309 self.mk_pkg(
310 _eclasses_=['python-single-r1'],
311 - IUSE='python_targets_python2_7 '
312 + IUSE='python_targets_python3_5 '
313 'python_targets_python3_6 '
314 - 'python_single_target_python2_7 '
315 + 'python_single_target_python3_5 '
316 'python_single_target_python3_6',
317 - RDEPEND='python_single_target_python2_7? ( '
318 + RDEPEND='python_single_target_python3_5? ( '
319 ' dev-foo/bar ) '
320 'python_single_target_python3_6? ( '
321 ' dev-lang/python:3.6 )',
322 - REQUIRED_USE='^^ ( python_single_target_python2_7 '
323 + REQUIRED_USE='^^ ( python_single_target_python3_5 '
324 ' python_single_target_python3_6 ) '
325 - 'python_single_target_python2_7? ( '
326 - ' python_targets_python2_7 ) '
327 + 'python_single_target_python3_5? ( '
328 + ' python_targets_python3_5 ) '
329 'python_single_target_python3_6? ( '
330 ' python_targets_python3_6 )')),
331 python.PythonMissingDeps)
332 @@ -402,18 +402,18 @@ class TestPythonCheck(misc.ReportTestCase):
333 self.check,
334 self.mk_pkg(
335 _eclasses_=['python-single-r1'],
336 - IUSE='python_targets_python2_7 '
337 + IUSE='python_targets_python3_5 '
338 'python_targets_python3_6 '
339 - 'python_single_target_python2_7 '
340 + 'python_single_target_python3_5 '
341 'python_single_target_python3_6',
342 - DEPEND='python_single_target_python2_7? ( '
343 - ' dev-lang/python:2.7 ) '
344 + DEPEND='python_single_target_python3_5? ( '
345 + ' dev-lang/python:3.5 ) '
346 'python_single_target_python3_6? ( '
347 ' dev-lang/python:3.6 )',
348 - REQUIRED_USE='^^ ( python_single_target_python2_7 '
349 + REQUIRED_USE='^^ ( python_single_target_python3_5 '
350 ' python_single_target_python3_6 ) '
351 - 'python_single_target_python2_7? ( '
352 - ' python_targets_python2_7 ) '
353 + 'python_single_target_python3_5? ( '
354 + ' python_targets_python3_5 ) '
355 'python_single_target_python3_6? ( '
356 ' python_targets_python3_6 )')),
357 python.PythonMissingDeps)
358 @@ -425,18 +425,18 @@ class TestPythonCheck(misc.ReportTestCase):
359 self.check,
360 self.mk_pkg(
361 _eclasses_=['python-single-r1'],
362 - IUSE='python_targets_python2_7 '
363 + IUSE='python_targets_python3_5 '
364 'python_targets_python3_6 '
365 - 'python_single_target_python2_7 '
366 + 'python_single_target_python3_5 '
367 'python_single_target_python3_6',
368 - RDEPEND='python_targets_python2_7? ( '
369 - ' dev-lang/python:2.7 ) '
370 + RDEPEND='python_targets_python3_5? ( '
371 + ' dev-lang/python:3.5 ) '
372 'python_targets_python3_6? ( '
373 ' dev-lang/python:3.6 )',
374 - REQUIRED_USE='^^ ( python_single_target_python2_7 '
375 + REQUIRED_USE='^^ ( python_single_target_python3_5 '
376 ' python_single_target_python3_6 ) '
377 - 'python_single_target_python2_7? ( '
378 - ' python_targets_python2_7 ) '
379 + 'python_single_target_python3_5? ( '
380 + ' python_targets_python3_5 ) '
381 'python_single_target_python3_6? ( '
382 ' python_targets_python3_6 )')),
383 python.PythonMissingDeps)
384 @@ -451,18 +451,18 @@ class TestPythonCheck(misc.ReportTestCase):
385 self.mk_pkg(
386 _eclasses_=['python-any-r1'],
387 DEPEND='|| ( '
388 - ' dev-lang/python:2.7 '
389 + ' dev-lang/python:3.5 '
390 ' dev-lang/python:3.6 )',
391 RDEPEND='|| ( '
392 - ' dev-lang/python:2.7 '
393 + ' dev-lang/python:3.5 '
394 ' dev-lang/python:3.6 )'))
395 assert isinstance(r, python.PythonRuntimeDepInAnyR1)
396 - assert 'inherits python-any-r1 with RDEPEND="dev-lang/python:2.7"' in str(r)
397 + assert 'inherits python-any-r1 with RDEPEND="dev-lang/python:3.5"' in str(r)
398
399 # shouldn't trigger for blockers
400 self.assertNoReport(
401 self.check,
402 self.mk_pkg(
403 _eclasses_=['python-any-r1'],
404 - DEPEND='dev-lang/python:2.7',
405 + DEPEND='dev-lang/python:3.5',
406 RDEPEND='!dev-python/pypy3-bin:0'))