diff --git a/tests/test_sidecar_import.py b/tests/test_sidecar_import.py index 817705b..f9ebabc 100644 --- a/tests/test_sidecar_import.py +++ b/tests/test_sidecar_import.py @@ -92,13 +92,17 @@ def test_sidecar_creates_provenance(importer, import_layout): def test_reimport_same_post_idempotent(importer, import_layout): import_root, _ = import_layout + # Threshold 0: only an exact phash match collapses. Orthogonal splits + # still sit within the default Hamming-10 at 64-bit, so without this + # the 2nd image would be skipped as a near-dup (phash dedup working). + importer.settings.phash_threshold = 0 payload = {"category": "patreon", "id": 777, "title": "P"} m1 = import_root / "Bob" / "p1.jpg" _split(m1, "v") _sidecar(m1, payload) importer.import_one(m1) m2 = import_root / "Bob" / "p2.jpg" - _split(m2, "h") # structurally distinct → not a phash dup + _split(m2, "h") # distinct phash; threshold 0 → both import _sidecar(m2, payload) r2 = importer.import_one(m2) assert r2.status == "imported"