def test_run_task_with_requirements(self): f = Mock() f2 = Mock() task = Task("fooqaaz") task.requires("foobar") task << Chute.create(f)() task2 = Task("foobar") task2 << Chute.create(f2)() Hellbox.add_task(task) Hellbox.add_task(task2) Hellbox.run_task("fooqaaz") assert f2.called
def test_run_task_with_requirements(self): f = Mock() f2 = Mock() task = Task('fooqaaz') task.requires('foobar') task.start_chain(Chute.create(f)()) task2 = Task('foobar') task2.start_chain(Chute.create(f2)()) Hellbox.add_task(task) Hellbox.add_task(task2) Hellbox.run_task('fooqaaz') assert f2.called