MCPcopy
hub / github.com/treeverse/dvc / test_commit_granular_output

Function test_commit_granular_output

tests/func/test_commit.py:131–146  ·  view source on GitHub ↗
(tmp_dir, dvc)

Source from the content-addressed store, hash-verified

129
130
131def test_commit_granular_output(tmp_dir, dvc):
132 dvc.run(
133 name="mystage",
134 cmd=[
135 "python -c \"open('foo', 'wb').write(b'foo\\n')\"",
136 "python -c \"open('bar', 'wb').write(b'bar\\n')\"",
137 ],
138 outs=["foo", "bar"],
139 no_commit=True,
140 )
141
142 cache = tmp_dir / ".dvc" / "cache" / "files" / "md5"
143 assert not list(cache.glob("*/*"))
144
145 dvc.commit("foo")
146 assert list(cache.glob("*/*")) == [cache / "d3" / "b07384d113edec49eaa6238ad5ff00"]
147
148
149def test_commit_granular_output_file(tmp_dir, dvc):

Callers

nothing calls this directly

Calls 2

runMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected