def test_leaf_bad(self):
     # A -> B -> C where all projects are bad.
     reasons = {'A': None, 'B': 'A', 'C': 'B'}
     self.assertEqual({('C', 'B', 'A')}, ciu.reasons_to_paths(reasons))
 def test_leaf_okay(self):
     # A -> B where B is okay.
     reasons = {'A': None}
     self.assertEqual({('A',)}, ciu.reasons_to_paths(reasons))
 def test_all_projects_okay(self):
     # A, B, and C are fine on their own.
     self.assertEqual(set(), ciu.reasons_to_paths({}))
Esempio n. 4
0
 def test_leaf_bad(self):
     # A -> B -> C where all projects are bad.
     reasons = {'A': None, 'B': 'A', 'C': 'B'}
     self.assertEqual(frozenset([('C', 'B', 'A')]),
                      ciu.reasons_to_paths(reasons))
Esempio n. 5
0
 def test_leaf_okay(self):
     # A -> B where B is okay.
     reasons = {'A': None}
     self.assertEqual(frozenset([('A', )]), ciu.reasons_to_paths(reasons))
Esempio n. 6
0
 def test_all_projects_okay(self):
     # A, B, and C are fine on their own.
     self.assertEqual(set(), ciu.reasons_to_paths({}))