mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
parent
d88ab8a668
commit
6fe42bddd9
7
.github/workflows/wheels.yml
vendored
7
.github/workflows/wheels.yml
vendored
|
@ -104,7 +104,7 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.x"
|
||||||
|
|
||||||
- name: Prepare for build
|
- name: Prepare for build
|
||||||
run: |
|
run: |
|
||||||
|
@ -147,14 +147,13 @@ jobs:
|
||||||
CIBW_BEFORE_ALL: "{package}\\winbuild\\build\\build_dep_all.cmd"
|
CIBW_BEFORE_ALL: "{package}\\winbuild\\build\\build_dep_all.cmd"
|
||||||
CIBW_CACHE_PATH: "C:\\cibw"
|
CIBW_CACHE_PATH: "C:\\cibw"
|
||||||
CIBW_TEST_SKIP: "*-win_arm64"
|
CIBW_TEST_SKIP: "*-win_arm64"
|
||||||
CIBW_TEST_COMMAND: >-
|
CIBW_TEST_COMMAND: 'docker run --rm
|
||||||
docker run --rm
|
|
||||||
-v {project}:C:\pillow
|
-v {project}:C:\pillow
|
||||||
-v C:\cibw:C:\cibw
|
-v C:\cibw:C:\cibw
|
||||||
-v %CD%\..\venv-test:%CD%\..\venv-test
|
-v %CD%\..\venv-test:%CD%\..\venv-test
|
||||||
-e CI -e GITHUB_ACTIONS
|
-e CI -e GITHUB_ACTIONS
|
||||||
mcr.microsoft.com/windows/servercore:ltsc2022
|
mcr.microsoft.com/windows/servercore:ltsc2022
|
||||||
powershell C:\pillow\.github\workflows\wheels-test.ps1 %CD%\..\venv-test
|
powershell C:\pillow\.github\workflows\wheels-test.ps1 %CD%\..\venv-test'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
- name: Upload wheels
|
- name: Upload wheels
|
||||||
|
|
|
@ -263,7 +263,7 @@ def djpeg_available():
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(["djpeg", "-version"])
|
subprocess.check_call(["djpeg", "-version"])
|
||||||
return True
|
return True
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError: # pragma: no cover
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ def cjpeg_available():
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(["cjpeg", "-version"])
|
subprocess.check_call(["cjpeg", "-version"])
|
||||||
return True
|
return True
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError: # pragma: no cover
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,14 @@ from .helper import assert_image_equal_tofile, skip_unless_feature
|
||||||
|
|
||||||
|
|
||||||
class TestImageGrab:
|
class TestImageGrab:
|
||||||
|
@pytest.mark.skipif(
|
||||||
|
os.environ.get("USERNAME") == "ContainerAdministrator",
|
||||||
|
reason="can't grab screen when running in Docker",
|
||||||
|
)
|
||||||
@pytest.mark.skipif(
|
@pytest.mark.skipif(
|
||||||
sys.platform not in ("win32", "darwin"), reason="requires Windows or macOS"
|
sys.platform not in ("win32", "darwin"), reason="requires Windows or macOS"
|
||||||
)
|
)
|
||||||
def test_grab(self):
|
def test_grab(self):
|
||||||
if os.environ.get("USERNAME") == "ContainerAdministrator":
|
|
||||||
pytest.skip("can't grab screen when running in Docker")
|
|
||||||
ImageGrab.grab()
|
ImageGrab.grab()
|
||||||
ImageGrab.grab(include_layered_windows=True)
|
ImageGrab.grab(include_layered_windows=True)
|
||||||
ImageGrab.grab(all_screens=True)
|
ImageGrab.grab(all_screens=True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user