commit:     21d9b579dc3fda2105caf3328ac5f0afbd80b9a2
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  9 23:04:50 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Feb  9 23:15:01 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=21d9b579

test_virtual_w3m: test with www-client/w3m in @world

Test for behavior reported in bug 649622 comment #10, where
depclean removed virtual/w3m-0 even though www-client/w3m
was in the world file. Since nothing is removed here, it
means that we have not reproduced the behavior reported in
this comment.

Bug: https://bugs.gentoo.org/649622#c19
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/tests/resolver/test_or_choices.py | 29 +++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/lib/portage/tests/resolver/test_or_choices.py 
b/lib/portage/tests/resolver/test_or_choices.py
index 5679d0b5b..a295c9a22 100644
--- a/lib/portage/tests/resolver/test_or_choices.py
+++ b/lib/portage/tests/resolver/test_or_choices.py
@@ -523,6 +523,35 @@ class OrChoicesTestCase(TestCase):
                        playground.cleanup()
 
 
+               test_cases = (
+
+                       # Test for behavior reported in bug 649622 comment #10, 
where
+                       # depclean removed virtual/w3m-0 even though 
www-client/w3m
+                       # was in the world file. Since nothing is removed here, 
it
+                       # means that we have not reproduced the behavior 
reported in
+                       # this comment.
+                       ResolverPlaygroundTestCase(
+                               [],
+                               options={'--depclean': True},
+                               success=True,
+                               cleanlist=[],
+                       ),
+
+               )
+
+               world += ['www-client/w3m']
+
+               playground = ResolverPlayground(ebuilds=ebuilds,
+                       installed=installed, world=world, debug=False)
+               try:
+                       for test_case in test_cases:
+                               playground.run_TestCase(test_case)
+                               self.assertEqual(test_case.test_success, True, 
test_case.fail_msg)
+               finally:
+                       playground.debug = False
+                       playground.cleanup()
+
+
 class OrChoicesLibpostprocTestCase(TestCase):
 
        def testOrChoicesLibpostproc(self):

Reply via email to