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

Function test_remote_add_relative_path

tests/func/test_remote.py:32–41  ·  view source on GitHub ↗
(dvc)

Source from the content-addressed store, hash-verified

30
31
32def test_remote_add_relative_path(dvc):
33 dname = os.path.join("..", "path", "to", "dir")
34 ret = main(["remote", "add", "mylocal", dname])
35 assert ret == 0
36
37 # NOTE: we are in the repo's root and config is in .dvc/, so
38 # dir path written to config should be just one level above.
39 rel = os.path.join("..", dname)
40 config = configobj.ConfigObj(dvc.config.files["repo"])
41 assert config['remote "mylocal"']["url"] == rel.replace("\\", "/")
42
43
44def test_remote_overwrite(dvc):

Callers

nothing calls this directly

Calls 3

mainFunction · 0.90
joinMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected