f-strings!

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
nulano 2020-09-22 22:19:04 +01:00 committed by GitHub
parent 0838d8ea62
commit 7d284b72ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -770,7 +770,7 @@ class TestImageFont:
)
def test_anchor(self, anchor):
name, text = "quick", "Quick"
path = "Tests/images/test_anchor_%s_%s.png" % (name, anchor)
path = f"Tests/images/test_anchor_{name}_{anchor}.png"
f = ImageFont.truetype(
"Tests/fonts/NotoSans-Regular.ttf", 48, layout_engine=self.LAYOUT_ENGINE
)
@ -804,7 +804,7 @@ class TestImageFont:
),
)
def test_anchor_multiline(self, anchor, align):
target = "Tests/images/test_anchor_multiline_%s_%s.png" % (anchor, align)
target = f"Tests/images/test_anchor_multiline_{anchor}_{align}.png"
text = "a\nlong\ntext sample"
f = ImageFont.truetype(

View File

@ -217,7 +217,7 @@ def test_anchor_ttb(anchor):
pytest.skip("FreeType <2.5.1 has incompatible ttb metrics")
text = "f"
path = "Tests/images/test_anchor_ttb_%s_%s.png" % (text, anchor)
path = f"Tests/images/test_anchor_ttb_{text}_{anchor}.png"
f = ImageFont.truetype("Tests/fonts/NotoSans-Regular.ttf", 120)
im = Image.new("RGB", (200, 400), "white")
@ -281,7 +281,7 @@ def test_combine(name, text, dir, anchor, epsilon):
# Improved computation of emulated vertical metrics for TrueType fonts.
pytest.skip("FreeType <2.5.1 has incompatible ttb metrics")
path = "Tests/images/test_combine_%s.png" % name
path = f"Tests/images/test_combine_{name}.png"
f = ImageFont.truetype("Tests/fonts/NotoSans-Regular.ttf", 48)
im = Image.new("RGB", (400, 400), "white")