From 21d9b579dc3fda2105caf3328ac5f0afbd80b9a2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 9 Feb 2020 15:04:50 -0800 Subject: 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 --- lib/portage/tests/resolver/test_or_choices.py | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'lib') 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): -- cgit v1.2.3-65-gdbad