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

Function _make_valid_index_dir

tests/test_cli.py:232–241  ·  view source on GitHub ↗

Create a fake valid index directory with the expected structure.

(cache_folder: Path, sha: str = "a" * 64)

Source from the content-addressed store, hash-verified

230
231
232def _make_valid_index_dir(cache_folder: Path, sha: str = "a" * 64) -> Path:
233 """Create a fake valid index directory with the expected structure."""
234 index_dir = cache_folder / sha / "index"
235 index_dir.mkdir(parents=True)
236 # Create the files that PersistencePath.non_existing checks
237 (index_dir / "chunks.json").write_text("[]")
238 (index_dir / "bm25_index").write_text("")
239 (index_dir / "semantic_index").write_text("")
240 (index_dir / "metadata.json").write_text("{}")
241 return index_dir
242
243
244@pytest.mark.parametrize(

Callers 3

test_run_clear_indexFunction · 0.85
test_run_clear_allFunction · 0.85
test_cli_clear_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected