Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayak-mehta committed Dec 25, 2024
1 parent ef38e8f commit 22eb2eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Empty file modified scripts/build_macos.sh
100644 → 100755
Empty file.
8 changes: 5 additions & 3 deletions tests/test_pdftopng.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import os

import pytest

from pdftopng import pdftopng
from PIL import Image, ImageChops

from pdftopng import pdftopng

testdir = os.path.dirname(os.path.abspath(__file__))

Expand All @@ -19,4 +18,7 @@ def test_pdftopng():
im1 = Image.open(os.path.join(testdir, "foo.png"))
im2 = Image.open("/tmp/foo.png")

assert ImageChops.difference(im1, im2).getbbox() is None
diff = ImageChops.difference(im1, im2)
extrema = diff.getextrema()
max_diff = max(max(channel) for channel in extrema)
assert max_diff <= 5, f"Images differ by {max_diff} pixels"

0 comments on commit 22eb2eb

Please sign in to comment.