def testExecutionOrderWithNothingPending(self): graph = datamake.graph.DirectedGraph() graph.add_node('task1', task=self.tmpTask('task1', True)) runner = datamake.runner.Runner('task1', graph) execution_order = runner.get_execution_order('task1', graph) self.assertEquals(['task1'], execution_order) runner.check_artifacts() pending_order = runner.get_pending_execution_order() self.assertEquals([], pending_order)
def testExecutionOrderWithOnlyOnePendingTask(self): graph = datamake.graph.DirectedGraph() graph.add_node('task1', task=self.tmpTask('task1', True)) graph.add_node('task2', task=self.tmpTask('task2')) graph.add_edge('task1','task2') runner = datamake.runner.Runner('task2', graph) self.assertEquals(['task1','task2'], runner.get_execution_order('task2',graph)) runner.check_artifacts() pending_graph = runner.get_pending_graph() self.assertEquals(['task2'], runner.get_execution_order('task2',pending_graph))