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

Function test_run_clear_all

tests/test_cli.py:314–331  ·  view source on GitHub ↗

_run_clear('all') handles both indexes and savings.

(
    populate: bool, expected_fragments: list[str], tmp_path: Path, capsys: pytest.CaptureFixture[str]
)

Source from the content-addressed store, hash-verified

312 ],
313)
314def test_run_clear_all(
315 populate: bool, expected_fragments: list[str], tmp_path: Path, capsys: pytest.CaptureFixture[str]
316) -> None:
317 """_run_clear('all') handles both indexes and savings."""
318 if populate:
319 _make_valid_index_dir(tmp_path, "d" * 64)
320 (tmp_path / "savings.jsonl").write_text('{"tokens": 50}\n')
321
322 with patch("semble.cli.resolve_cache_folder", return_value=tmp_path):
323 _run_clear("all")
324
325 out = capsys.readouterr().out
326 for fragment in expected_fragments:
327 assert fragment in out
328
329 if populate:
330 assert not (tmp_path / ("d" * 64)).exists()
331 assert not (tmp_path / "savings.jsonl").exists()
332
333
334@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

_run_clearFunction · 0.90
_make_valid_index_dirFunction · 0.85

Tested by

no test coverage detected