Fix Flake8

This commit is contained in:
Hugo 2018-12-29 16:59:33 +02:00 committed by Andrew Murray
parent 87e54b47ab
commit 2dcf6cafb2

View File

@ -289,9 +289,10 @@ class TestFileGif(PillowTestCase):
for frame in range(3): for frame in range(3):
img.seek(frame) img.seek(frame)
for x in range(3): for x in range(3):
color = img.getpixel((x,0)) color = img.getpixel((x, 0))
self.assertEqual(color, expected_colors[frame][x], self.assertEqual(
'frame %i, x %i' % (frame, x)) color, expected_colors[frame][x], "frame %i, x %i" % (frame, x)
)
def test_rewind(self): def test_rewind(self):
img = Image.open("Tests/images/rewind.gif") img = Image.open("Tests/images/rewind.gif")
@ -304,14 +305,13 @@ class TestFileGif(PillowTestCase):
img.seek(1) img.seek(1)
# Read data. This should decode frame 0 and then frame 1. # Read data. This should decode frame 0 and then frame 1.
img.getpixel((0,1)) img.getpixel((0, 1))
expected_colors = [(2, 3), (3, 1)] expected_colors = [(2, 3), (3, 1)]
for x in range(2): for x in range(2):
for y in range(2): for y in range(2):
color = img.getpixel((x,y)) color = img.getpixel((x, y))
self.assertEqual(color, expected_colors[x][y], self.assertEqual(color, expected_colors[x][y], "%ix%i" % (x, y))
'%ix%i' % (x, y))
def test_dispose_previous(self): def test_dispose_previous(self):
img = Image.open("Tests/images/dispose_prev.gif") img = Image.open("Tests/images/dispose_prev.gif")