feat: analyze_folder orchestrates all checks
This commit is contained in:
@@ -88,3 +88,24 @@ def test_different_images_are_not_duplicates(tmp_path):
|
||||
p2 = make_diagonal_image(tmp_path, "diagonal.jpg")
|
||||
groups = find_duplicates([p1, p2], threshold=8)
|
||||
assert len(groups) == 0
|
||||
|
||||
|
||||
from analyzer import analyze_folder
|
||||
|
||||
|
||||
def test_analyze_folder_returns_results(tmp_path):
|
||||
make_test_image(tmp_path, color=(128, 128, 128))
|
||||
from PIL import Image
|
||||
white = tmp_path / "white.jpg"
|
||||
Image.new("RGB", (100, 100), color=(255, 255, 255)).save(white)
|
||||
|
||||
results = analyze_folder(
|
||||
folder=str(tmp_path),
|
||||
blur_threshold=100,
|
||||
over_threshold=240,
|
||||
under_threshold=30,
|
||||
dup_threshold=8,
|
||||
use_ai=False,
|
||||
)
|
||||
reasons_flat = [r for item in results for r in item["reasons"]]
|
||||
assert "ueberbelichtet" in reasons_flat
|
||||
|
||||
Reference in New Issue
Block a user