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

Function test_open_no_remote

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

Source from the content-addressed store, hash-verified

57
58
59def test_open_no_remote(tmp_dir, dvc):
60 tmp_dir.dvc_gen("file", "file")
61 (tmp_dir / "file").unlink()
62 remove(dvc.cache.local.path)
63
64 fs = DataFileSystem(index=dvc.index.data["repo"])
65 with pytest.raises(FileNotFoundError):
66 with fs.open("file", "r"):
67 pass
68
69
70def test_open_dirty_no_hash(tmp_dir, dvc):

Callers

nothing calls this directly

Calls 5

removeFunction · 0.90
DataFileSystemClass · 0.90
dvc_genMethod · 0.80
unlinkMethod · 0.80
openMethod · 0.80

Tested by

no test coverage detected