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

Method test

tests/func/test_checkout.py:137–143  ·  view source on GitHub ↗
(self, mocker, tmp_dir, dvc)

Source from the content-addressed store, hash-verified

135
136class TestCheckoutCleanWorkingDir:
137 def test(self, mocker, tmp_dir, dvc):
138 (stage,) = tmp_dir.dvc_gen("data", {"foo": "foo"})
139
140 # change working directory
141 (tmp_dir / "data").gen("not_cached.txt", "not_cached")
142 assert main(["checkout", stage.relpath, "--force"]) == 0
143 assert not (tmp_dir / "data" / "not_cached.txt").exists()
144
145 def test_force(self, mocker, tmp_dir, dvc):
146 (stage,) = tmp_dir.dvc_gen("data", {"foo": "foo"})

Callers

nothing calls this directly

Calls 4

mainFunction · 0.90
dvc_genMethod · 0.80
genMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected