ambigous_merge_order: handle more failure modes
authorZac Medico <zmedico@gentoo.org>
Sat, 21 May 2011 04:14:49 +0000 (21:14 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 26 May 2011 03:43:25 +0000 (20:43 -0700)
pym/portage/tests/resolver/ResolverPlayground.py

index 667731b1bf5395f5ccb517c521e77b1d52f45712..5048b44e2ab7d98ad28a75ed148314851dffb851 100644 (file)
@@ -559,6 +559,14 @@ class ResolverPlaygroundTestCase(object):
                                                if not match:
                                                        # result doesn't match, so stop early
                                                        break
+                                               if expected_obj:
+                                                       # result does not match, so stop early
+                                                       new_expected.append(tuple(expected_obj))
+                                                       break
+                                       if expected_stack:
+                                               # result does not match, add leftovers to new_expected
+                                               expected_stack.reverse()
+                                               new_expected.extend(expected_stack)
                                        expected = new_expected
 
                        elif key == "unstable_keywords" and expected is not None: