dag: add --outs option (#4739)

Fixes #4532
This commit is contained in:
Guro Bokum
2020-11-12 18:23:31 +09:00
committed by GitHub
parent 72eb4a5737
commit eeba567774
2 changed files with 47 additions and 4 deletions
+14
View File
@@ -58,6 +58,20 @@ def test_build_target(graph):
assert set(G.edges()) == {("3", "a.dvc"), ("3", "b.dvc")}
def test_build_target_with_outs(graph):
(stage,) = filter(
lambda s: hasattr(s, "name") and s.name == "3", graph.nodes()
)
G = _build(graph, target=stage, outs=True)
assert set(G.nodes()) == {"a", "b", "h", "i"}
assert set(G.edges()) == {
("h", "a"),
("h", "b"),
("i", "a"),
("i", "b"),
}
def test_build_full(graph):
(stage,) = filter(
lambda s: hasattr(s, "name") and s.name == "3", graph.nodes()