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

Function test_open_dirty_hash

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

Source from the content-addressed store, hash-verified

46
47
48def test_open_dirty_hash(tmp_dir, dvc):
49 tmp_dir.dvc_gen("file", "file")
50 (tmp_dir / "file").write_text("something")
51
52 fs = DataFileSystem(index=dvc.index.data["repo"])
53 with fs.open("file", "r") as fobj:
54 # NOTE: Unlike DVCFileSystem, DataFileSystem should not
55 # be affected by a dirty workspace.
56 assert fobj.read() == "file"
57
58
59def test_open_no_remote(tmp_dir, dvc):

Callers

nothing calls this directly

Calls 5

DataFileSystemClass · 0.90
dvc_genMethod · 0.80
write_textMethod · 0.80
openMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected