Fix expected failures on big endian systems without CI

This commit is contained in:
Jakub Kulík 2020-07-16 11:04:16 +02:00
parent 74c8072945
commit ee856bdc25
3 changed files with 5 additions and 8 deletions

View File

@ -8,7 +8,6 @@ from .helper import (
assert_image_equal, assert_image_equal,
assert_image_similar, assert_image_similar,
is_big_endian, is_big_endian,
on_ci,
skip_unless_feature, skip_unless_feature,
) )
@ -190,14 +189,14 @@ def test_16bit_monochrome_has_correct_mode():
assert jp2.mode == "I;16" assert jp2.mode == "I;16"
@pytest.mark.xfail(is_big_endian() and on_ci(), reason="Fails on big-endian") @pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_16bit_monochrome_jp2_like_tiff(): def test_16bit_monochrome_jp2_like_tiff():
with Image.open("Tests/images/16bit.cropped.tif") as tiff_16bit: with Image.open("Tests/images/16bit.cropped.tif") as tiff_16bit:
with Image.open("Tests/images/16bit.cropped.jp2") as jp2: with Image.open("Tests/images/16bit.cropped.jp2") as jp2:
assert_image_similar(jp2, tiff_16bit, 1e-3) assert_image_similar(jp2, tiff_16bit, 1e-3)
@pytest.mark.xfail(is_big_endian() and on_ci(), reason="Fails on big-endian") @pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_16bit_monochrome_j2k_like_tiff(): def test_16bit_monochrome_j2k_like_tiff():
with Image.open("Tests/images/16bit.cropped.tif") as tiff_16bit: with Image.open("Tests/images/16bit.cropped.tif") as tiff_16bit:
with Image.open("Tests/images/16bit.cropped.j2k") as j2k: with Image.open("Tests/images/16bit.cropped.j2k") as j2k:

View File

@ -12,7 +12,6 @@ from .helper import (
hopper, hopper,
is_big_endian, is_big_endian,
is_win32, is_win32,
on_ci,
skip_unless_feature, skip_unless_feature,
) )
@ -69,7 +68,7 @@ class TestFilePng:
png.crc(cid, s) png.crc(cid, s)
return chunks return chunks
@pytest.mark.xfail(is_big_endian() and on_ci(), reason="Fails on big-endian") @pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_sanity(self, tmp_path): def test_sanity(self, tmp_path):
# internal version number # internal version number

View File

@ -5,7 +5,6 @@ from .helper import (
assert_image_equal, assert_image_equal,
assert_image_similar, assert_image_similar,
is_big_endian, is_big_endian,
on_ci,
skip_unless_feature, skip_unless_feature,
) )
@ -27,7 +26,7 @@ def test_n_frames():
assert im.is_animated assert im.is_animated
@pytest.mark.xfail(is_big_endian() and on_ci(), reason="Fails on big-endian") @pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_write_animation_L(tmp_path): def test_write_animation_L(tmp_path):
""" """
Convert an animated GIF to animated WebP, then compare the frame count, and first Convert an animated GIF to animated WebP, then compare the frame count, and first
@ -53,7 +52,7 @@ def test_write_animation_L(tmp_path):
assert_image_similar(im, orig.convert("RGBA"), 25.0) assert_image_similar(im, orig.convert("RGBA"), 25.0)
@pytest.mark.xfail(is_big_endian() and on_ci(), reason="Fails on big-endian") @pytest.mark.xfail(is_big_endian(), reason="Fails on big-endian")
def test_write_animation_RGB(tmp_path): def test_write_animation_RGB(tmp_path):
""" """
Write an animated WebP from RGB frames, and ensure the frames Write an animated WebP from RGB frames, and ensure the frames