mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-08-03 05:18:22 +00:00
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:
parent
ae7c9cdd46
commit
2aa698da1e
1 changed files with 22 additions and 0 deletions
|
|
@ -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
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue