MCPcopy
hub / github.com/MinishLab/semble / test_clear_cache

Function test_clear_cache

tests/test_cache.py:119–127  ·  view source on GitHub ↗

clear_cache removes the index directory when it exists and is a no-op otherwise.

(tmp_path: Path)

Source from the content-addressed store, hash-verified

117
118
119def test_clear_cache(tmp_path: Path) -> None:
120 """clear_cache removes the index directory when it exists and is a no-op otherwise."""
121 index_path = tmp_path / "index"
122 with patch("semble.cache.find_index_from_cache_folder", return_value=index_path):
123 clear_cache("/some/path") # no-op: path doesn't exist yet
124 index_path.mkdir()
125 with patch("semble.cache.find_index_from_cache_folder", return_value=index_path):
126 clear_cache("/some/path")
127 assert not index_path.exists()
128
129
130def _write_metadata(

Callers

nothing calls this directly

Calls 1

clear_cacheFunction · 0.90

Tested by

no test coverage detected