def test_build_full_outs(repo, granular): target = "h" if granular else "3" G = _build(repo, target=target, outs=True, full=True) assert set(G.nodes()) == {"j", "i", "d", "b", "g", "f", "e", "a", "h"} assert set(G.edges()) == { ("d", "a"), ("e", "a"), ("f", "b"), ("g", "b"), ("h", "a"), ("h", "b"), ("i", "a"), ("i", "b"), ("j", "a"), ("j", "h"), }
def test_build_full(repo): G = _build(repo, target="3", full=True) assert nx.is_isomorphic(G, repo.index.graph)
def test_build_target(repo): G = _build(repo, target="3") assert set(G.nodes()) == {"3", "b.dvc", "a.dvc"} assert set(G.edges()) == {("3", "a.dvc"), ("3", "b.dvc")}
def test_build_granular_target_with_outs(repo): G = _build(repo, target="h", outs=True) assert set(G.nodes()) == {"a", "b", "h"} assert set(G.edges()) == {("h", "a"), ("h", "b")}
def test_build(repo): assert nx.is_isomorphic(_build(repo), repo.index.graph)