From f2ea798f3f22be9a9801382aef235ee1af49b1a1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 22 May 2011 13:02:26 -0700 Subject: [PATCH] test_merge_order: test hard block resolution --- pym/portage/tests/resolver/test_merge_order.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py index 2df3a9963..1904d5cc4 100644 --- a/pym/portage/tests/resolver/test_merge_order.py +++ b/pym/portage/tests/resolver/test_merge_order.py @@ -18,6 +18,7 @@ class MergeOrderTestCase(TestCase): "DEPEND" : "!!app-misc/installed-blocker-a", }, "app-misc/blocker-update-order-a-1" : {}, + "app-misc/blocker-update-order-hard-a-1" : {}, "app-misc/blocker-runtime-a-1" : {}, "app-misc/blocker-runtime-b-1" : {}, "app-misc/blocker-runtime-hard-a-1" : {}, @@ -87,6 +88,11 @@ class MergeOrderTestCase(TestCase): "RDEPEND" : "!app-misc/blocker-update-order-a", }, "app-misc/installed-old-version-blocks-a-2" : {}, + "app-misc/installed-old-version-blocks-hard-a-1" : { + "EAPI" : "2", + "RDEPEND" : "!!app-misc/blocker-update-order-hard-a", + }, + "app-misc/installed-old-version-blocks-hard-a-2" : {}, "app-misc/some-app-a-1": { "RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b", }, @@ -118,6 +124,10 @@ class MergeOrderTestCase(TestCase): "app-misc/installed-old-version-blocks-a-1" : { "RDEPEND" : "!app-misc/blocker-update-order-a", }, + "app-misc/installed-old-version-blocks-hard-a-1" : { + "EAPI" : "2", + "RDEPEND" : "!!app-misc/blocker-update-order-hard-a", + }, } test_cases = ( @@ -182,6 +192,14 @@ class MergeOrderTestCase(TestCase): success = True, all_permutations = True, mergelist = ["app-misc/installed-old-version-blocks-a-2", "app-misc/blocker-update-order-a-1"]), + # This is the same as above but with a hard blocker. The hard + # blocker is solved automatically since the update makes it + # irrelevant. + ResolverPlaygroundTestCase( + ["app-misc/blocker-update-order-hard-a", "app-misc/installed-old-version-blocks-hard-a"], + success = True, + all_permutations = True, + mergelist = ["app-misc/installed-old-version-blocks-hard-a-2", "app-misc/blocker-update-order-hard-a-1"]), # The installed package has runtime blockers that # should cause it to be uninstalled. The uninstall # task is executed only after blocking packages have -- 2.26.2