From 50a1fcfffbc27df8dfec733a351fbbdee6d8db11 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 20 May 2011 18:00:02 -0700 Subject: [PATCH] test_merge_order: test circular RDEPEND + PDEPEND --- pym/portage/tests/resolver/test_merge_order.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py index ada9e73fd..9c5d1fe3f 100644 --- a/pym/portage/tests/resolver/test_merge_order.py +++ b/pym/portage/tests/resolver/test_merge_order.py @@ -9,6 +9,12 @@ class MergeOrderTestCase(TestCase): def testMergeOrder(self): ebuilds = { + "app-misc/circ-post-runtime-a-1": { + "PDEPEND": "app-misc/circ-post-runtime-b", + }, + "app-misc/circ-post-runtime-b-1": { + "RDEPEND": "app-misc/circ-post-runtime-a", + }, "app-misc/circ-runtime-a-1": { "RDEPEND": "app-misc/circ-runtime-b", }, @@ -18,6 +24,9 @@ class MergeOrderTestCase(TestCase): "app-misc/some-app-a-1": { "RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b", }, + "app-misc/some-app-b-1": { + "RDEPEND": "app-misc/circ-post-runtime-a app-misc/circ-post-runtime-b", + }, } installed = { @@ -34,6 +43,13 @@ class MergeOrderTestCase(TestCase): success = True, ambigous_merge_order = True, mergelist = [("app-misc/circ-runtime-b-1", "app-misc/circ-runtime-a-1"), "app-misc/some-app-a-1"]), + # Test optimal merge order for a circular dep that is + # RDEPEND in one direction and PDEPEND in the other. + ResolverPlaygroundTestCase( + ["app-misc/some-app-a"], + success = True, + ambigous_merge_order = True, + mergelist = ["app-misc/circ-post-runtime-a-1", "app-misc/circ-post-runtime-b-1", "app-misc/some-app-b-1"]), ) playground = ResolverPlayground(ebuilds=ebuilds, installed=installed) -- 2.26.2