mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
flake8
This commit is contained in:
parent
6e9e4c1027
commit
08c72a1720
|
@ -283,6 +283,7 @@ def Draw(im, mode=None):
|
|||
except AttributeError:
|
||||
return ImageDraw(im, mode)
|
||||
|
||||
|
||||
# experimental access to the outline API
|
||||
try:
|
||||
Outline = Image.core.outline
|
||||
|
|
|
@ -136,8 +136,7 @@ class TestImageDraw(PillowTestCase):
|
|||
del draw
|
||||
|
||||
# Assert
|
||||
self.assert_image_similar(
|
||||
im, Image.open(expected), 1)
|
||||
self.assert_image_similar(im, Image.open(expected), 1)
|
||||
|
||||
def test_chord1(self):
|
||||
for mode in ["RGB", "L"]:
|
||||
|
@ -160,8 +159,7 @@ class TestImageDraw(PillowTestCase):
|
|||
del draw
|
||||
|
||||
# Assert
|
||||
self.assert_image_similar(
|
||||
im, Image.open(expected), 1)
|
||||
self.assert_image_similar(im, Image.open(expected), 1)
|
||||
|
||||
def test_ellipse1(self):
|
||||
for mode in ["RGB", "L"]:
|
||||
|
@ -313,15 +311,15 @@ class TestImageDraw(PillowTestCase):
|
|||
# Arrange
|
||||
im = Image.new(mode, (W, H))
|
||||
draw = ImageDraw.Draw(im)
|
||||
expected = "Tests/images/imagedraw_polygon_kite_{}.png".format(mode)
|
||||
expected = "Tests/images/imagedraw_polygon_kite_{}.png".format(
|
||||
mode)
|
||||
|
||||
# Act
|
||||
draw.polygon(KITE_POINTS, fill="blue", outline="yellow")
|
||||
del draw
|
||||
|
||||
# Assert
|
||||
self.assert_image_equal(
|
||||
im, Image.open(expected))
|
||||
self.assert_image_equal(im, Image.open(expected))
|
||||
|
||||
def helper_rectangle(self, bbox):
|
||||
# Arrange
|
||||
|
@ -564,5 +562,6 @@ class TestImageDraw(PillowTestCase):
|
|||
# Assert
|
||||
self.assert_image_similar(im, Image.open(expected), 1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user