MCPcopy Index your code
hub / github.com/treeverse/dvc / test_add_commit

Function test_add_commit

tests/func/test_add.py:324–334  ·  view source on GitHub ↗
(tmp_dir, dvc)

Source from the content-addressed store, hash-verified

322
323
324def test_add_commit(tmp_dir, dvc):
325 tmp_dir.gen("foo", "foo")
326 ret = main(["add", "foo", "--no-commit"])
327 assert ret == 0
328 assert os.path.isfile("foo")
329 assert not os.path.exists(dvc.cache.local.path)
330
331 ret = main(["commit", "foo.dvc"])
332 assert ret == 0
333 assert os.path.isfile("foo")
334 assert dvc.cache.local.exists("acbd18db4cc2f85cedef654fccc4a4d8")
335
336
337def test_should_collect_dir_cache_only_once(mocker, tmp_dir, dvc):

Callers

nothing calls this directly

Calls 4

mainFunction · 0.90
isfileMethod · 0.80
genMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected