Skip to content

Commit

Permalink
Merge pull request #5091 from nulano/gha-qus-4
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 12, 2020
2 parents 4ed79ea + a3ab868 commit ff40eaa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Tests/helper.py
Expand Up @@ -278,6 +278,12 @@ def is_big_endian():
return sys.byteorder == "big"


def is_ppc64le():
import platform

return platform.machine() == "ppc64le"


def is_win32():
return sys.platform.startswith("win32")

Expand Down
6 changes: 6 additions & 0 deletions Tests/test_file_libtiff.py
Expand Up @@ -16,6 +16,7 @@
assert_image_similar,
assert_image_similar_tofile,
hopper,
is_big_endian,
skip_unless_feature,
)

Expand Down Expand Up @@ -813,11 +814,13 @@ def test_strip_cmyk_16l_jpeg(self):
with Image.open(infile) as im:
assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 0.5)

@pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_strip_ycbcr_jpeg_2x2_sampling(self):
infile = "Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif"
with Image.open(infile) as im:
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 0.5)

@pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_strip_ycbcr_jpeg_1x1_sampling(self):
infile = "Tests/images/tiff_strip_ycbcr_jpeg_1x1_sampling.tif"
with Image.open(infile) as im:
Expand All @@ -828,16 +831,19 @@ def test_tiled_cmyk_jpeg(self):
with Image.open(infile) as im:
assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 0.5)

@pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_tiled_ycbcr_jpeg_1x1_sampling(self):
infile = "Tests/images/tiff_tiled_ycbcr_jpeg_1x1_sampling.tif"
with Image.open(infile) as im:
assert_image_equal_tofile(im, "Tests/images/flower2.jpg")

@pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_tiled_ycbcr_jpeg_2x2_sampling(self):
infile = "Tests/images/tiff_tiled_ycbcr_jpeg_2x2_sampling.tif"
with Image.open(infile) as im:
assert_image_similar_tofile(im, "Tests/images/flower.jpg", 0.5)

@pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_old_style_jpeg(self):
infile = "Tests/images/old-style-jpeg-compression.tif"
with Image.open(infile) as im:
Expand Down
3 changes: 2 additions & 1 deletion Tests/test_image_quantize.py
Expand Up @@ -2,7 +2,7 @@

from PIL import Image

from .helper import assert_image, assert_image_similar, hopper
from .helper import assert_image, assert_image_similar, hopper, is_ppc64le


def test_sanity():
Expand All @@ -17,6 +17,7 @@ def test_sanity():
assert_image_similar(converted.convert("RGB"), image, 60)


@pytest.mark.xfail(is_ppc64le(), reason="failing on ppc64le on GHA")
def test_libimagequant_quantize():
image = hopper()
try:
Expand Down

0 comments on commit ff40eaa

Please sign in to comment.