コード例 #1
0
ファイル: test_runner.py プロジェクト: songkick/datamake
  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)
コード例 #2
0
ファイル: test_runner.py プロジェクト: songkick/datamake
  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))