Skip to content

Commit

Permalink
fix debug mode
Browse files Browse the repository at this point in the history
Signed-off-by: Isotr0py <[email protected]>
  • Loading branch information
Isotr0py committed Jan 11, 2025
1 parent 6259a1a commit 42288c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
# we only use macos for fast testing
os: [macos-latest]
python-version: ['3.10', '3.11']
python-version: ['3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name = "pillow_jxl"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version="0.23.1", features = ["extension-module"] }
pyo3 = { version="0.23.3", features = ["extension-module"] }
jpegxl-rs = { version="0.11.0", default-features = false }

[features]
Expand Down
8 changes: 7 additions & 1 deletion test/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import tempfile

import pyexiv2
Expand All @@ -8,6 +9,11 @@
import pillow_jxl


def test_debug_mode():
exit_code = os.system('python -Xdev -c "from pillow_jxl import JpegXLImagePlugin"')
assert exit_code == 0


def test_decode():
img_jxl = Image.open("test/images/sample.jxl")
img_png = Image.open("test/images/sample.png")
Expand Down Expand Up @@ -122,5 +128,5 @@ def test_metadata_encode_from_pil_exif():
jxl_exif = pyexiv2.Image(temp).read_exif()
for key in ref_exif:
# Skip UserComment and GPSAltitude as they are broken
if key not in ("Exif.Photo.UserComment", 'Exif.GPSInfo.GPSAltitude'):
if key not in ("Exif.Photo.UserComment", "Exif.GPSInfo.GPSAltitude"):
assert ref_exif[key] == jxl_exif[key]

0 comments on commit 42288c4

Please sign in to comment.