From 181fad2918f6ca24f4f149ebd29af73dda34d2cb Mon Sep 17 00:00:00 2001 From: nulano Date: Sun, 30 Oct 2022 03:17:13 +0000 Subject: [PATCH] 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 04bdfc5aa..f19db440d 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -4,11 +4,10 @@ import sys 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(