_run_clear('all') handles both indexes and savings.
(
populate: bool, expected_fragments: list[str], tmp_path: Path, capsys: pytest.CaptureFixture[str]
)
| 312 | ], |
| 313 | ) |
| 314 | def 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( |
nothing calls this directly
no test coverage detected