From 809d6c8368a0209763eb441145670b27cdffd9aa Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 20 May 2011 18:11:56 -0700 Subject: [PATCH] test_merge_order: fix ambigous_merge_order bug --- pym/portage/tests/resolver/ResolverPlayground.py | 7 +++++-- pym/portage/tests/resolver/test_merge_order.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index bc2f80010..402db7bae 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -529,8 +529,11 @@ class ResolverPlaygroundTestCase(object): got_token = got_stack.pop() expected_obj = expected_stack.pop() if isinstance(expected_obj, basestring): - new_expected.append(got_token) - continue + new_expected.append(expected_obj) + if got_token == expected_obj: + continue + # result doesn't match, so stop early + break expected_obj = set(expected_obj) try: expected_obj.remove(got_token) diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py index 9c5d1fe3f..f51d14f6b 100644 --- a/pym/portage/tests/resolver/test_merge_order.py +++ b/pym/portage/tests/resolver/test_merge_order.py @@ -46,7 +46,7 @@ class MergeOrderTestCase(TestCase): # 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"], + ["app-misc/some-app-b"], 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"]), -- 2.26.2