From eaee7fda973d6915f7071f9b7f7edb7ad481ef7c Mon Sep 17 00:00:00 2001 From: nulano Date: Sun, 30 Oct 2022 02:56:05 +0000 Subject: [PATCH 1/3] add xfail mark to test_image_access:test_embeddable --- Tests/test_image_access.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index 955740b952a..04bdfc5aa8d 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -406,11 +406,8 @@ def test_putpixel_unrecognized_mode(self): class TestEmbeddable: - @pytest.mark.skipif( - not is_win32() or on_ci(), - reason="Failing on AppVeyor / GitHub Actions when run from subprocess, " - "not from shell", - ) + @pytest.mark.xfail(reason="failing test") + @pytest.mark.skipif(not is_win32(), reason="requires Windows") def test_embeddable(self): import ctypes From 181fad2918f6ca24f4f149ebd29af73dda34d2cb Mon Sep 17 00:00:00 2001 From: nulano Date: Sun, 30 Oct 2022 03:17:13 +0000 Subject: [PATCH 2/3] move import used only on Windows and remove unused import --- Tests/test_image_access.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index 04bdfc5aa8d..f19db440d6b 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -4,11 +4,10 @@ import sysconfig import pytest -from setuptools.command.build_ext import new_compiler from PIL import Image -from .helper import assert_image_equal, hopper, is_win32, on_ci +from .helper import assert_image_equal, hopper, is_win32 # CFFI imports pycparser which doesn't support PYTHONOPTIMIZE=2 # https://github.com/eliben/pycparser/pull/198#issuecomment-317001670 @@ -410,6 +409,7 @@ class TestEmbeddable: @pytest.mark.skipif(not is_win32(), reason="requires Windows") def test_embeddable(self): import ctypes + from setuptools.command.build_ext import new_compiler with open("embed_pil.c", "w", encoding="utf-8") as fh: fh.write( From 23df3bda7f4e052c84dc71d3dbf417f0d8d03741 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 30 Oct 2022 03:17:54 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- Tests/test_image_access.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index f19db440d6b..6c4f1ceec04 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -409,6 +409,7 @@ class TestEmbeddable: @pytest.mark.skipif(not is_win32(), reason="requires Windows") def test_embeddable(self): import ctypes + from setuptools.command.build_ext import new_compiler with open("embed_pil.c", "w", encoding="utf-8") as fh: