summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-20 18:11:56 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-20 18:11:56 -0700
commita3d40cef65ee8b0cef21e19c7e235ec5e36a58ea (patch)
treef3d312c372c303d4f78fb95c2e1acc5ace04734b
parent50a1fcfffbc27df8dfec733a351fbbdee6d8db11 (diff)
downloadportage-a3d40cef65ee8b0cef21e19c7e235ec5e36a58ea.tar.gz
portage-a3d40cef65ee8b0cef21e19c7e235ec5e36a58ea.tar.bz2
portage-a3d40cef65ee8b0cef21e19c7e235ec5e36a58ea.zip
test_merge_order: fix ambigous_merge_order bug
-rw-r--r--pym/portage/tests/resolver/ResolverPlayground.py7
-rw-r--r--pym/portage/tests/resolver/test_merge_order.py2
2 files changed, 6 insertions, 3 deletions
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"]),