def test_unordered_flow_provides_required_values(self): flow = uf.Flow('uf') flow.add(utils.TaskOneReturn('task1', provides='x'), utils.TaskOneArg('task2')) flow.add(utils.TaskOneReturn('task1', provides='x'), utils.TaskOneArg('task2')) self.assertEqual(set(['x']), flow.provides) self.assertEqual(set(['x']), flow.requires)
def test_linear_flow_provides_required_values(self): flow = lf.Flow('lf').add(utils.TaskOneReturn('task1', provides='x'), utils.TaskOneArg('task2')) self.assertEqual(set(), flow.requires) self.assertEqual(set(['x']), flow.provides)
def test_linear_flow_requires_rebind_values(self): flow = lf.Flow('lf').add(utils.TaskOneArg('task1', rebind=['q']), utils.TaskMultiArg('task2')) self.assertEqual(set(['x', 'y', 'z', 'q']), flow.requires) self.assertEqual(set(), flow.provides)
def test_graph_flow_requires_values(self): flow = gf.Flow('gf').add(utils.TaskOneArg('task1'), utils.TaskMultiArg('task2')) self.assertEqual(set(['x', 'y', 'z']), flow.requires) self.assertEqual(set(), flow.provides)