mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-14 14:24:13 +03:00
minor test formatting cleanup
This commit is contained in:
parent
61ee8ec03c
commit
c709aa3d28
|
@ -869,12 +869,12 @@ class TestImageFont:
|
|||
im = Image.new("RGB", (150, 150), "white")
|
||||
d = ImageDraw.Draw(im)
|
||||
|
||||
d.text((10, 10), "\U0001f469", embedded_color=True, font=font)
|
||||
d.text((10, 10), "\U0001f469", font=font, embedded_color=True)
|
||||
|
||||
assert_image_similar_tofile(im, "Tests/images/cbdt_notocoloremoji.png", 6.2)
|
||||
except IOError as e:
|
||||
except IOError as e: # pragma: no cover
|
||||
assert str(e) in ("unimplemented feature", "unknown file format")
|
||||
pytest.skip("freetype compiled without libpng or unsupported")
|
||||
pytest.skip("freetype compiled without libpng or CBDT support")
|
||||
|
||||
@skip_unless_feature_version("freetype2", "2.5.0")
|
||||
def test_cbdt_mask(self):
|
||||
|
@ -893,9 +893,9 @@ class TestImageFont:
|
|||
assert_image_similar_tofile(
|
||||
im, "Tests/images/cbdt_notocoloremoji_mask.png", 6.2
|
||||
)
|
||||
except IOError as e:
|
||||
except IOError as e: # pragma: no cover
|
||||
assert str(e) in ("unimplemented feature", "unknown file format")
|
||||
pytest.skip("freetype compiled without libpng or unsupported")
|
||||
pytest.skip("freetype compiled without libpng or CBDT support")
|
||||
|
||||
@skip_unless_feature_version("freetype2", "2.5.1")
|
||||
def test_sbix(self):
|
||||
|
@ -909,13 +909,13 @@ class TestImageFont:
|
|||
im = Image.new("RGB", (400, 400), "white")
|
||||
d = ImageDraw.Draw(im)
|
||||
|
||||
d.text((50, 50), "\uE901", embedded_color=True, font=font)
|
||||
d.text((50, 50), "\uE901", font=font, embedded_color=True)
|
||||
|
||||
with Image.open("Tests/images/chromacheck-sbix.png") as expected:
|
||||
assert_image_similar(im, expected, 1)
|
||||
except IOError as e:
|
||||
except IOError as e: # pragma: no cover
|
||||
assert str(e) in ("unimplemented feature", "unknown file format")
|
||||
pytest.skip("freetype compiled without libpng or unsupported")
|
||||
pytest.skip("freetype compiled without libpng or SBIX support")
|
||||
|
||||
@skip_unless_feature_version("freetype2", "2.5.1")
|
||||
def test_sbix_mask(self):
|
||||
|
@ -933,9 +933,9 @@ class TestImageFont:
|
|||
|
||||
with Image.open("Tests/images/chromacheck-sbix_mask.png") as expected:
|
||||
assert_image_similar(im, expected, 1)
|
||||
except IOError as e:
|
||||
except IOError as e: # pragma: no cover
|
||||
assert str(e) in ("unimplemented feature", "unknown file format")
|
||||
pytest.skip("freetype compiled without libpng or unsupported")
|
||||
pytest.skip("freetype compiled without libpng or SBIX support")
|
||||
|
||||
@skip_unless_feature_version("freetype2", "2.10.0")
|
||||
def test_colr(self):
|
||||
|
@ -948,7 +948,7 @@ class TestImageFont:
|
|||
im = Image.new("RGB", (300, 75), "white")
|
||||
d = ImageDraw.Draw(im)
|
||||
|
||||
d.text((15, 5), "Bungee", embedded_color=True, font=font)
|
||||
d.text((15, 5), "Bungee", font=font, embedded_color=True)
|
||||
|
||||
assert_image_similar_tofile(im, "Tests/images/colr_bungee.png", 21)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user