Exemple #1
0
 def test_set_downstream_no_flow(self):
     f = Flow(name="test")
     t1 = Task()
     t2 = Task()
     with pytest.raises(ValueError) as exc:
         t1.set_downstream(t2)
     assert "No Flow was passed" in str(exc.value)
Exemple #2
0
 def test_set_downstream_with_properties(self, props):
     with Flow(name="test") as f:
         t1 = Task()
         t2 = Task()
         t1.set_downstream(t2, **props)
         assert Edge(t1, t2, **props) in f.edges
Exemple #3
0
 def test_set_downstream_no_flow(self):
     f = Flow(name="test")
     t1 = Task()
     t2 = Task()
     with pytest.raises(ValueError, match="No Flow was passed"):
         t1.set_downstream(t2)
Exemple #4
0
 def test_set_downstream_context(self):
     with Flow(name="test") as f:
         t1 = Task()
         t2 = Task()
         t1.set_downstream(t2)
         assert Edge(t1, t2) in f.edges
Exemple #5
0
 def test_set_downstream(self):
     f = Flow(name="test")
     t1 = Task()
     t2 = Task()
     t1.set_downstream(t2, flow=f)
     assert Edge(t1, t2) in f.edges