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)
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
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)
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
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