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

Function test_update_import_url

tests/func/test_update.py:187–204  ·  view source on GitHub ↗
(tmp_dir, dvc, workspace)

Source from the content-addressed store, hash-verified

185
186
187def test_update_import_url(tmp_dir, dvc, workspace):
188 workspace.gen("file", "file content")
189
190 dst = tmp_dir / "imported_file"
191 stage = dvc.imp_url("remote://workspace/file", os.fspath(dst))
192
193 assert dst.is_file()
194 assert dst.read_text() == "file content"
195
196 # update data
197 workspace.gen("file", "updated file content")
198
199 assert dvc.status([stage.path]) == {}
200 dvc.update([stage.path])
201 assert dvc.status([stage.path]) == {}
202
203 assert dst.is_file()
204 assert dst.read_text() == "updated file content"
205
206
207@pytest.mark.parametrize("outs_exist", [False, True])

Callers

nothing calls this directly

Calls 6

is_fileMethod · 0.80
genMethod · 0.45
fspathMethod · 0.45
read_textMethod · 0.45
statusMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected