From: Zac Medico Date: Sat, 21 May 2011 01:11:56 +0000 (-0700) Subject: test_merge_order: fix ambigous_merge_order bug X-Git-Tag: v2.2.0_alpha35~31 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a3d40cef65ee8b0cef21e19c7e235ec5e36a58ea;p=portage.git test_merge_order: fix ambigous_merge_order bug --- diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index 5d1c1b39c..298107c06 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -536,8 +536,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"]),