Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark new test failures on non-x86 as xfail #5091

Merged
merged 2 commits into from
Dec 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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