Tests: ResolverPlayground: Support checking the suggestions given by the circular...
authorSebastian Luther <SebastianLuther@gmx.de>
Thu, 19 Aug 2010 22:55:46 +0000 (00:55 +0200)
committerZac Medico <zmedico@gentoo.org>
Thu, 19 Aug 2010 23:13:34 +0000 (16:13 -0700)
pym/portage/tests/resolver/ResolverPlayground.py

index 7945f2688abc7ee675f56f6aae119a12fe80a386..fb691ba638e6fcd0a7af7705cd29bc3632870623 100644 (file)
@@ -280,6 +280,7 @@ class ResolverPlaygroundTestCase(object):
                        "use_changes": None,
                        "unstable_keywords": None,
                        "slot_collision_solutions": None,
+                       "circular_dependency_solutions": None,
                        }
                
                self.all_permutations = kwargs.pop("all_permutations", False)
@@ -330,6 +331,7 @@ class ResolverPlaygroundResult(object):
                self.use_changes = None
                self.unstable_keywords = None
                self.slot_collision_solutions = None
+               self.circular_dependency_solutions = None
 
                if self.depgraph._dynamic_config._serialized_tasks_cache is not None:
                        self.mergelist = []
@@ -366,3 +368,9 @@ class ResolverPlaygroundResult(object):
                                                        changes[flag] = False
                                        s[pkg.cpv] = changes
                                self.slot_collision_solutions.append(s)
+
+               if self.depgraph._dynamic_config._circular_dependency_handler is not None:
+                       handler = self.depgraph._dynamic_config._circular_dependency_handler
+                       sol = handler.solutions
+                       self.circular_dependency_solutions = dict( zip([x.cpv for x in sol.keys()], sol.values()) )
+