Beispiel #1
0
    def testOverlappingChainedDependencies(self):
        projects     = ["a", "b", "c"]
        dependencies = [("b", "a"), ("c", "b"), ("c", "a")]

        self.assertEqual(
            buildorder.getBuildOrder(projects, dependencies),
            ["c", "b", "a"]
        )
Beispiel #2
0
    def testMultipleDependencies(self):
        projects     = ["a", "b", "c"]
        dependencies = [("a", "c"), ("b", "c")]

        self.assertEqual(
            buildorder.getBuildOrder(projects, dependencies),
            ["a", "b", "c"]
        )
Beispiel #3
0
 def testNoDependencies(self):
     self.assertEqual(
         buildorder.getBuildOrder(["a"]),
         ["a"]
     )
Beispiel #4
0
    def testUnresolvableDependencies(self):
        projects     = ["a", "b", "c", "d"]
        dependencies = [("a", "b"), ("b", "c"), ("c", "a")]

        with self.assertRaises(buildorder.DependencyError):
            buildorder.getBuildOrder(projects, dependencies)