Skip to content

Commit

Permalink
Test test_save_p_transparent_black on big endian with Pillow 5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jan 1, 2022
1 parent a1ef11b commit 50f2964
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 25 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/build.yml
Expand Up @@ -13,29 +13,8 @@ jobs:
target:
- "latest"
image:
# Run slower jobs first to give them a headstart and reduce waiting time
- "ubuntu-20.04-focal-arm64v8"
- "ubuntu-20.04-focal-ppc64le"
- "ubuntu-20.04-focal-s390x"
# Then run the remainder
- "alpine"
- "amazon-2-amd64"
- "arch"
- "centos-7-amd64"
- "centos-8-amd64"
- "centos-stream-8-amd64"
- "debian-10-buster-x86"
- "fedora-34-amd64"
- "fedora-35-amd64"
- "manylinux2014-wheel-build"
- "ubuntu-18.04-bionic-amd64"
- "ubuntu-20.04-focal-amd64"
- "ubuntu-20.04-focal-amd64-valgrind"
include:
- image: "ubuntu-20.04-focal-arm64v8"
qemu-arch: "aarch64"
- image: "ubuntu-20.04-focal-ppc64le"
qemu-arch: "ppc64le"
- image: "ubuntu-20.04-focal-s390x"
qemu-arch: "s390x"

Expand Down
1 change: 1 addition & 0 deletions Makefile.sub
Expand Up @@ -9,6 +9,7 @@ BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
build:
cp -r ../Pillow/depends .
cp test.sh depends
cp script.py depends
docker build -t $(IMAGENAME):$(BRANCH) .

.PHONY: update
Expand Down
11 changes: 11 additions & 0 deletions ubuntu-20.04-focal-s390x/script.py
@@ -0,0 +1,11 @@
from PIL import Image
im = Image.new("RGBA", (10, 10), (0, 0, 0, 0))
assert im.getcolors() == [(100, (0, 0, 0, 0))]

im = im.convert("P")
test_file = "/tmp/temp.png"
im.save(test_file)

# check if saved image contains same transparency
with Image.open(test_file) as im:
assert len(im.info["transparency"]) == 256
7 changes: 3 additions & 4 deletions ubuntu-20.04-focal-s390x/test.sh
@@ -1,6 +1,5 @@
#!/bin/bash
source /vpy3/bin/activate
cd /Pillow
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
python3 -m pip install Pillow==5.1.0
python3 -m pip show Pillow
python3 depends/script.py

0 comments on commit 50f2964

Please sign in to comment.