mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
flake8
This commit is contained in:
parent
d1ca4916e0
commit
a3b0659790
|
@ -110,7 +110,7 @@ class PillowTestCase(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
url = test_image_results.upload(a, b)
|
url = test_image_results.upload(a, b)
|
||||||
logger.error("Url for test images: %s" % url)
|
logger.error("Url for test images: %s" % url)
|
||||||
except Exception as msg:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.fail(msg or "got different content")
|
self.fail(msg or "got different content")
|
||||||
|
|
|
@ -415,7 +415,7 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
im = Image.open('Tests/images/multipage.tiff')
|
im = Image.open('Tests/images/multipage.tiff')
|
||||||
frames = im.n_frames
|
frames = im.n_frames
|
||||||
self.assertEqual(frames, 3)
|
self.assertEqual(frames, 3)
|
||||||
for idx in range(frames):
|
for _ in range(frames):
|
||||||
im.seek(0)
|
im.seek(0)
|
||||||
# Should not raise ValueError: I/O operation on closed file
|
# Should not raise ValueError: I/O operation on closed file
|
||||||
im.load()
|
im.load()
|
||||||
|
|
|
@ -56,7 +56,7 @@ class TestImage(PillowTestCase):
|
||||||
self.assertEqual(im.width, 1)
|
self.assertEqual(im.width, 1)
|
||||||
self.assertEqual(im.height, 2)
|
self.assertEqual(im.height, 2)
|
||||||
|
|
||||||
with self.assertRaises(AttributeError) as e:
|
with self.assertRaises(AttributeError):
|
||||||
im.size = (3, 4)
|
im.size = (3, 4)
|
||||||
|
|
||||||
def test_invalid_image(self):
|
def test_invalid_image(self):
|
||||||
|
|
|
@ -11,7 +11,7 @@ try:
|
||||||
import Tkinter as tk
|
import Tkinter as tk
|
||||||
dir(ImageTk)
|
dir(ImageTk)
|
||||||
HAS_TK = True
|
HAS_TK = True
|
||||||
except (OSError, ImportError) as v:
|
except (OSError, ImportError):
|
||||||
# Skipped via setUp()
|
# Skipped via setUp()
|
||||||
HAS_TK = False
|
HAS_TK = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user