mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 11:35:52 +03:00
Remove unused variable, and other minor flake8 warnings
This commit is contained in:
parent
a40854499f
commit
02476b7689
|
@ -5,6 +5,7 @@ import io
|
|||
|
||||
from PIL import Image, TiffImagePlugin
|
||||
|
||||
|
||||
class LibTiffTestCase(PillowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
@ -32,6 +33,7 @@ class LibTiffTestCase(PillowTestCase):
|
|||
out = self.tempfile("temp.png")
|
||||
im.save(out)
|
||||
|
||||
|
||||
class TestFileLibTiff(LibTiffTestCase):
|
||||
|
||||
def test_g4_tiff(self):
|
||||
|
@ -288,7 +290,7 @@ class TestFileLibTiff(LibTiffTestCase):
|
|||
im2 = Image.open(out)
|
||||
self.assert_image_equal(im, im2)
|
||||
|
||||
def xtest_bw_compression_wRGB(self):
|
||||
def xtest_bw_compression_w_rgb(self):
|
||||
""" This test passes, but when running all tests causes a failure due
|
||||
to output on stderr from the error thrown by libtiff. We need to
|
||||
capture that but not now"""
|
||||
|
@ -319,19 +321,19 @@ class TestFileLibTiff(LibTiffTestCase):
|
|||
# file is a multipage tiff, 10x10 green, 10x10 red, 20x20 blue
|
||||
|
||||
im.seek(0)
|
||||
self.assertEqual(im.size, (10,10))
|
||||
self.assertEqual(im.convert('RGB').getpixel((0,0)), (0,128,0))
|
||||
self.assertEqual(im.size, (10, 10))
|
||||
self.assertEqual(im.convert('RGB').getpixel((0, 0)), (0, 128, 0))
|
||||
self.assertTrue(im.tag.next)
|
||||
|
||||
im.seek(1)
|
||||
self.assertEqual(im.size, (10,10))
|
||||
self.assertEqual(im.convert('RGB').getpixel((0,0)), (255,0,0))
|
||||
self.assertEqual(im.size, (10, 10))
|
||||
self.assertEqual(im.convert('RGB').getpixel((0, 0)), (255, 0, 0))
|
||||
self.assertTrue(im.tag.next)
|
||||
|
||||
im.seek(2)
|
||||
self.assertFalse(im.tag.next)
|
||||
self.assertEqual(im.size, (20,20))
|
||||
self.assertEqual(im.convert('RGB').getpixel((0,0)), (0,0,255))
|
||||
self.assertEqual(im.size, (20, 20))
|
||||
self.assertEqual(im.convert('RGB').getpixel((0, 0)), (0, 0, 255))
|
||||
|
||||
TiffImagePlugin.READ_LIBTIFF = False
|
||||
|
||||
|
@ -369,8 +371,6 @@ class TestFileLibTiff(LibTiffTestCase):
|
|||
|
||||
def save_bytesio(compression=None):
|
||||
|
||||
testfile = self.tempfile("temp_.tiff".format(compression))
|
||||
|
||||
buffer_io = io.BytesIO()
|
||||
pilim.save(buffer_io, format="tiff", compression=compression)
|
||||
buffer_io.seek(0)
|
||||
|
@ -387,7 +387,6 @@ class TestFileLibTiff(LibTiffTestCase):
|
|||
TiffImagePlugin.READ_LIBTIFF = False
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user