Skip to content

Commit

Permalink
minor test formatting cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nulano authored and radarhere committed Feb 22, 2021
1 parent 61ee8ec commit c709aa3
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Tests/test_imagefont.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,12 +869,12 @@ def test_cbdt(self):
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):
Expand All @@ -893,9 +893,9 @@ def test_cbdt_mask(self):
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):
Expand All @@ -909,13 +909,13 @@ def test_sbix(self):
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):
Expand All @@ -933,9 +933,9 @@ def test_sbix_mask(self):

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):
Expand All @@ -948,7 +948,7 @@ def test_colr(self):
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)

Expand Down

0 comments on commit c709aa3

Please sign in to comment.