From e377d243b167dc1a053c01b3fd21765425f78411 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 24 Nov 2020 23:25:20 +0200 Subject: [PATCH 1/4] Remove soon-EOL Amazon Linux 1 and CentOS 6 --- .github/workflows/test-docker.yml | 2 -- docs/installation.rst | 4 ---- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml index ddec1bee499..6acb6cf700d 100644 --- a/.github/workflows/test-docker.yml +++ b/.github/workflows/test-docker.yml @@ -15,10 +15,8 @@ jobs: ubuntu-18.04-bionic-amd64, ubuntu-20.04-focal-amd64, debian-10-buster-x86, - centos-6-amd64, centos-7-amd64, centos-8-amd64, - amazon-1-amd64, amazon-2-amd64, fedora-32-amd64, fedora-33-amd64, diff --git a/docs/installation.rst b/docs/installation.rst index bb8c06580b9..279d7870429 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -422,12 +422,8 @@ These platforms are built and tested for every change. +----------------------------------+--------------------------+-----------------------+ | Arch | 3.8 |x86-64 | +----------------------------------+--------------------------+-----------------------+ -| Amazon Linux 1 | 3.6 |x86-64 | -+----------------------------------+--------------------------+-----------------------+ | Amazon Linux 2 | 3.7 |x86-64 | +----------------------------------+--------------------------+-----------------------+ -| CentOS 6 | 3.6 |x86-64 | -+----------------------------------+--------------------------+-----------------------+ | CentOS 7 | 3.6 |x86-64 | +----------------------------------+--------------------------+-----------------------+ | CentOS 8 | 3.6 |x86-64 | From 5abdbe12313162e40e6e9e65e7793d808fad8fb0 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 25 Nov 2020 00:02:34 +0200 Subject: [PATCH 2/4] Sort for easier reference --- .github/workflows/test-docker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml index 6acb6cf700d..f6814f93257 100644 --- a/.github/workflows/test-docker.yml +++ b/.github/workflows/test-docker.yml @@ -11,15 +11,15 @@ jobs: matrix: docker: [ alpine, + amazon-2-amd64, arch, - ubuntu-18.04-bionic-amd64, - ubuntu-20.04-focal-amd64, - debian-10-buster-x86, centos-7-amd64, centos-8-amd64, - amazon-2-amd64, + debian-10-buster-x86, fedora-32-amd64, fedora-33-amd64, + ubuntu-18.04-bionic-amd64, + ubuntu-20.04-focal-amd64, ] dockerTag: [master] From 74048f9b4ffd0bfee645cd13f276a888434332d1 Mon Sep 17 00:00:00 2001 From: nulano Date: Wed, 25 Nov 2020 07:27:11 +0000 Subject: [PATCH 3/4] remove FT 2.3 from tests --- Tests/test_imagefont.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index 7824b7f5364..f779463e69b 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -35,14 +35,6 @@ class TestImageFont: # Freetype has different metrics depending on the version. # (and, other things, but first things first) METRICS = { - (">=2.3", "<2.4"): { - "multiline": 30, - "textsize": 12, - "getters": (13, 16), - "mask": (107, 13), - "multiline-anchor": 6, - "getlength": (36, 27, 27, 33), - }, (">=2.7",): { "multiline": 6.2, "textsize": 2.5, From 86993df834ace1e6bbe0a05ebd8d288a601eeb9d Mon Sep 17 00:00:00 2001 From: nulano Date: Wed, 25 Nov 2020 07:38:13 +0000 Subject: [PATCH 4/4] remove duplicate values --- Tests/test_imagefont.py | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index f779463e69b..06ed426586a 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -35,22 +35,8 @@ class TestImageFont: # Freetype has different metrics depending on the version. # (and, other things, but first things first) METRICS = { - (">=2.7",): { - "multiline": 6.2, - "textsize": 2.5, - "getters": (12, 16), - "mask": (108, 13), - "multiline-anchor": 4, - "getlength": (36, 21, 24, 33), - }, - "Default": { - "multiline": 0.5, - "textsize": 0.5, - "getters": (12, 16), - "mask": (108, 13), - "multiline-anchor": 4, - "getlength": (36, 24, 24, 33), - }, + (">=2.7",): {"multiline": 6.2, "textsize": 2.5, "getlength": (36, 21, 24, 33)}, + "Default": {"multiline": 0.5, "textsize": 0.5, "getlength": (36, 24, 24, 33)}, } @classmethod @@ -387,7 +373,7 @@ def test_rotated_transposed_font_get_mask(self): mask = transposed_font.getmask(text) # Assert - assert mask.size == self.metrics["mask"][::-1] + assert mask.size == (13, 108) def test_unrotated_transposed_font_get_mask(self): # Arrange @@ -400,7 +386,7 @@ def test_unrotated_transposed_font_get_mask(self): mask = transposed_font.getmask(text) # Assert - assert mask.size == self.metrics["mask"] + assert mask.size == (108, 13) def test_free_type_font_get_name(self): # Arrange @@ -444,7 +430,7 @@ def test_free_type_font_get_mask(self): mask = font.getmask(text) # Assert - assert mask.size == self.metrics["mask"] + assert mask.size == (108, 13) def test_load_path_not_found(self): # Arrange @@ -625,7 +611,7 @@ def test_imagefont_getters(self): assert t.font.glyphs == 4177 assert t.getsize("A") == (12, 16) assert t.getsize("AB") == (24, 16) - assert t.getsize("M") == self.metrics["getters"] + assert t.getsize("M") == (12, 16) assert t.getsize("y") == (12, 20) assert t.getsize("a") == (12, 16) assert t.getsize_multiline("A") == (12, 16) @@ -861,7 +847,7 @@ def test_anchor_multiline(self, anchor, align): ) with Image.open(target) as expected: - assert_image_similar(im, expected, self.metrics["multiline-anchor"]) + assert_image_similar(im, expected, 4) def test_anchor_invalid(self): font = self.get_font()