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

Method test_file

dvc/testing/workspace_tests.py:202–206  ·  view source on GitHub ↗
(self, cloud, fname)

Source from the content-addressed store, hash-verified

200class TestLsUrl:
201 @pytest.mark.parametrize("fname", ["foo", "foo.dvc", "dir/foo"])
202 def test_file(self, cloud, fname):
203 cloud.gen({fname: "foo contents"})
204 fs, fs_path = parse_external_url(cloud.url, cloud.config)
205 result = ls_url(str(cloud / fname), fs_config=cloud.config)
206 match_files(fs, result, [{"path": fs.join(fs_path, fname), "isdir": False}])
207
208 def test_dir(self, cloud):
209 cloud.gen({"dir/foo": "foo contents", "dir/subdir/bar": "bar contents"})

Callers

nothing calls this directly

Calls 5

ls_urlFunction · 0.90
parse_external_urlFunction · 0.85
joinMethod · 0.80
match_filesFunction · 0.70
genMethod · 0.45

Tested by

no test coverage detected