예제 #1
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')]),
                      dependencies.reasons_to_paths(reasons))
예제 #2
0
 def test_leaf_okay(self):
     # A -> B where B is okay.
     reasons = {'A': None}
     self.assertEqual(frozenset([('A', )]),
                      dependencies.reasons_to_paths(reasons))
예제 #3
0
 def test_all_projects_okay(self):
     # A, B, and C are fine on their own.
     self.assertEqual(set(), dependencies.reasons_to_paths({}))
예제 #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')]),
                      dependencies.reasons_to_paths(reasons))
예제 #5
0
 def test_leaf_okay(self):
     # A -> B where B is okay.
     reasons = {'A': None}
     self.assertEqual(frozenset([('A',)]),
                      dependencies.reasons_to_paths(reasons))
예제 #6
0
 def test_all_projects_okay(self):
     # A, B, and C are fine on their own.
     self.assertEqual(set(), dependencies.reasons_to_paths({}))