MCPcopy Index your code
hub / github.com/huggingface/datasets / test_cached_path_missing_local

Function test_cached_path_missing_local

tests/test_file_utils.py:125–133  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

123
124
125def test_cached_path_missing_local(tmp_path):
126 # absolute path
127 missing_file = str(tmp_path.resolve() / "__missing_file__.txt")
128 with pytest.raises(FileNotFoundError):
129 cached_path(missing_file)
130 # relative path
131 missing_file = "./__missing_file__.txt"
132 with pytest.raises(FileNotFoundError):
133 cached_path(missing_file)
134
135
136def test_get_from_cache_fsspec(tmpfs_file):

Callers

nothing calls this directly

Calls 2

cached_pathFunction · 0.90
resolveMethod · 0.45

Tested by

no test coverage detected