Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/
Date: Sun, 09 Feb 2020 23:57:30
Message-Id: 1581292576.c3e9a0fe26434edcc2c034c6b863789eb6afbc34.zmedico@gentoo
1 commit: c3e9a0fe26434edcc2c034c6b863789eb6afbc34
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 9 23:53:42 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 9 23:56:16 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c3e9a0fe
7
8 test_virtual_w3m: test without www-client/w3m installed
9
10 Add test case showing that virtual/w3m-0 is not pulled in when
11 www-client/w3m is not installed and not in @world.
12
13 Bug: https://bugs.gentoo.org/649622
14 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
15
16 lib/portage/tests/resolver/test_or_choices.py | 39 +++++++++++++++++++++++----
17 1 file changed, 34 insertions(+), 5 deletions(-)
18
19 diff --git a/lib/portage/tests/resolver/test_or_choices.py b/lib/portage/tests/resolver/test_or_choices.py
20 index a295c9a22..a7ede1fac 100644
21 --- a/lib/portage/tests/resolver/test_or_choices.py
22 +++ b/lib/portage/tests/resolver/test_or_choices.py
23 @@ -455,18 +455,47 @@ class OrChoicesTestCase(TestCase):
24 'EAPI': '7',
25 },
26
27 + }
28 +
29 + world = ['app-text/xmlto', 'www-client/elinks', 'www-client/lynx']
30 +
31 + test_cases = (
32 +
33 + # Test for bug 649622 (without www-client/w3m installed),
34 + # where virtual/w3m was pulled in only to be removed by the
35 + # next emerge --depclean.
36 + ResolverPlaygroundTestCase(
37 + ['@world'],
38 + options = {'--update': True, '--deep': True},
39 + success = True,
40 + mergelist = []
41 + ),
42 +
43 + )
44 +
45 + playground = ResolverPlayground(ebuilds=ebuilds,
46 + installed=installed, world=world, debug=False)
47 + try:
48 + for test_case in test_cases:
49 + playground.run_TestCase(test_case)
50 + self.assertEqual(test_case.test_success, True, test_case.fail_msg)
51 + finally:
52 + playground.debug = False
53 + playground.cleanup()
54 +
55 + installed = dict(itertools.chain(installed.items(), {
56 +
57 'www-client/w3m-0.5.3_p20190105' : {
58 'EAPI': '7',
59 },
60
61 - }
62 -
63 - world = ['app-text/xmlto', 'www-client/elinks', 'www-client/lynx']
64 + }.items()))
65
66 test_cases = (
67
68 - # Test for bug 649622, where virtual/w3m was pulled in only
69 - # to be removed by the next emerge --depclean.
70 + # Test for bug 649622 (with www-client/w3m installed),
71 + # where virtual/w3m was pulled in only to be removed by the
72 + # next emerge --depclean.
73 ResolverPlaygroundTestCase(
74 ['@world'],
75 options = {'--update': True, '--deep': True},