Count files skipped as already canonical apart from skipped images 🟥

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-29 08:50:45 +00:00
parent ae7c9cdd46
commit 2aa698da1e

View file

@ -373,6 +373,28 @@ def test_skips_already_canonical_files() -> None:
sp.rename_file.assert_not_called()
def test_summary_counts_already_canonical_and_image_skips_apart() -> None:
# Arrange
sp = MagicMock()
sp.get_folders_in_path.return_value = {
"value": [
_make_file("500_Pine Ln BB3 3CC_Doc.pdf", "id-1"),
_make_file("Front elevation.JPG", "id-2"),
_make_file("Rear elevation.heic", "id-3"),
]
}
# Act
summary = _make_orchestrator(sp)._process_folder(
"some/path", "500", "5 Pine Ln", "BB3 3CC"
)
# Assert
assert summary == RenameSummary(
skipped_already_canonical=1, skipped_images=2
)
# ---------------------------------------------------------------------------
# _process_folder — dry_run=True logs intent but never calls rename_file
# ---------------------------------------------------------------------------