diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-05-12 15:16:23 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-05-12 15:16:23 -0700 |
commit | 75ff9dea4e2bc141e53acaf7edb43f8b54fc56e5 (patch) | |
tree | c959ec546168d3744b7c5716fbae304a91a06065 /pym/portage/tests | |
parent | ae95697010a331a98fe112bdac565c3dcbcd3160 (diff) | |
download | portage-75ff9dea4e2bc141e53acaf7edb43f8b54fc56e5.tar.gz portage-75ff9dea4e2bc141e53acaf7edb43f8b54fc56e5.tar.bz2 portage-75ff9dea4e2bc141e53acaf7edb43f8b54fc56e5.zip |
test_digraph: fix get_cycles for PYTHONHASHSEED
Diffstat (limited to 'pym/portage/tests')
-rw-r--r-- | pym/portage/tests/util/test_digraph.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage/tests/util/test_digraph.py b/pym/portage/tests/util/test_digraph.py index 4fb1f9571..4e858cf88 100644 --- a/pym/portage/tests/util/test_digraph.py +++ b/pym/portage/tests/util/test_digraph.py @@ -198,10 +198,11 @@ class DigraphTest(TestCase): self.assertEqual(x.shortest_path("C", "A"), ["C", "A"]) self.assertEqual(x.shortest_path("A", "C", ignore_priority=0), ["A", "B", "C"]) self.assertEqual(x.shortest_path("C", "A", ignore_priority=0), ["C", "A"]) - cycles = set(tuple(y) for y in x.get_cycles()) - self.assertEqual(cycles, set([("C", "A"), ("A", "B"), ("A", "C")])) + cycles = set(frozenset(y) for y in x.get_cycles()) + self.assertEqual(cycles, set([frozenset(["A", "B"]), frozenset(["A", "C"]), frozenset(["B", "C"])])) x.remove_edge("A", "B") - self.assertEqual(x.get_cycles(), [["C", "A"], ["A", "C"], ["C", "B"]]) + cycles = set(frozenset(y) for y in x.get_cycles()) + self.assertEqual(cycles, set([frozenset(["A", "C"]), frozenset(["C", "B"])])) x.difference_update(["C"]) self.assertEqual(x.all_nodes(), ["A", "B"]) portage.util.noiselimit = -2 |