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

Function test_open

tests/unit/fs/test_data.py:38–45  ·  view source on GitHub ↗
(tmp_dir, dvc)

Source from the content-addressed store, hash-verified

36
37
38def test_open(tmp_dir, dvc):
39 tmp_dir.gen("foo", "foo")
40 dvc.add("foo")
41 (tmp_dir / "foo").unlink()
42
43 fs = DataFileSystem(index=dvc.index.data["repo"])
44 with fs.open("foo", "r") as fobj:
45 assert fobj.read() == "foo"
46
47
48def test_open_dirty_hash(tmp_dir, dvc):

Callers

nothing calls this directly

Calls 6

DataFileSystemClass · 0.90
unlinkMethod · 0.80
openMethod · 0.80
genMethod · 0.45
addMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected