Returns None when the current file set differs from the stored manifest.
(
stored_files: list[str], current_files: list[str], tmp_path: Path
)
| 328 | ], |
| 329 | ) |
| 330 | def test_get_validated_cache_manifest_mismatch( |
| 331 | stored_files: list[str], current_files: list[str], tmp_path: Path |
| 332 | ) -> None: |
| 333 | """Returns None when the current file set differs from the stored manifest.""" |
| 334 | index_path = tmp_path / "index" |
| 335 | walk_return = [] |
| 336 | for f in current_files: |
| 337 | p = tmp_path / f |
| 338 | # Make sure file is not empty |
| 339 | p.write_text("a") |
| 340 | walk_return.append(p) |
| 341 | _write_metadata(index_path, "my/model", ["code"], float("inf"), file_paths=stored_files) |
| 342 | with patch("semble.cache.find_index_from_cache_folder", return_value=index_path): |
| 343 | with patch("semble.cache.walk_files", return_value=walk_return): |
| 344 | result = get_validated_cache(str(tmp_path), "my/model", [ContentType.CODE]) |
| 345 | assert result is None |
nothing calls this directly
no test coverage detected