From a3ab868b0f4d1d147030b4eead32a046ed48bf72 Mon Sep 17 00:00:00 2001 From: nulano Date: Wed, 4 Nov 2020 00:58:06 +0000 Subject: [PATCH] xfail tests failing on ppc64le on GHA (cherry picked from commit 9c7fb5bd14c3064fede96131a0f7f67abf26a4e7) --- Tests/helper.py | 6 ++++++ Tests/test_image_quantize.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Tests/helper.py b/Tests/helper.py index 3da2571f2..d76389621 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -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") diff --git a/Tests/test_image_quantize.py b/Tests/test_image_quantize.py index 921c39e3f..af4172c88 100644 --- a/Tests/test_image_quantize.py +++ b/Tests/test_image_quantize.py @@ -2,7 +2,7 @@ import pytest 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(): @@ -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: