mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-01 10:23:34 +03:00
flake8
This commit is contained in:
parent
552a9a28a0
commit
8cb5688047
|
@ -144,7 +144,7 @@ class TestFileTiff(PillowTestCase):
|
||||||
def test_multipage(self):
|
def test_multipage(self):
|
||||||
# issue #862
|
# issue #862
|
||||||
im = Image.open('Tests/images/multipage.tiff')
|
im = Image.open('Tests/images/multipage.tiff')
|
||||||
# file is a multipage tiff, 10x10 green, 10x10 red, 20x20 blue
|
# file is a multipage tiff: 10x10 green, 10x10 red, 20x20 blue
|
||||||
|
|
||||||
im.seek(0)
|
im.seek(0)
|
||||||
self.assertEqual(im.size, (10, 10))
|
self.assertEqual(im.size, (10, 10))
|
||||||
|
@ -166,7 +166,6 @@ class TestFileTiff(PillowTestCase):
|
||||||
self.assertEqual(im.size, (20, 20))
|
self.assertEqual(im.size, (20, 20))
|
||||||
self.assertEqual(im.convert('RGB').getpixel((0, 0)), (0, 0, 255))
|
self.assertEqual(im.convert('RGB').getpixel((0, 0)), (0, 0, 255))
|
||||||
|
|
||||||
|
|
||||||
def test___str__(self):
|
def test___str__(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
file = "Tests/images/pil136.tiff"
|
file = "Tests/images/pil136.tiff"
|
||||||
|
@ -199,7 +198,6 @@ class TestFileTiff(PillowTestCase):
|
||||||
|
|
||||||
def test_load_byte(self):
|
def test_load_byte(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
from PIL import TiffImagePlugin
|
|
||||||
ifd = TiffImagePlugin.ImageFileDirectory()
|
ifd = TiffImagePlugin.ImageFileDirectory()
|
||||||
data = b"abc"
|
data = b"abc"
|
||||||
|
|
||||||
|
@ -211,7 +209,6 @@ class TestFileTiff(PillowTestCase):
|
||||||
|
|
||||||
def test_load_string(self):
|
def test_load_string(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
from PIL import TiffImagePlugin
|
|
||||||
ifd = TiffImagePlugin.ImageFileDirectory()
|
ifd = TiffImagePlugin.ImageFileDirectory()
|
||||||
data = b"abc\0"
|
data = b"abc\0"
|
||||||
|
|
||||||
|
@ -223,7 +220,6 @@ class TestFileTiff(PillowTestCase):
|
||||||
|
|
||||||
def test_load_float(self):
|
def test_load_float(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
from PIL import TiffImagePlugin
|
|
||||||
ifd = TiffImagePlugin.ImageFileDirectory()
|
ifd = TiffImagePlugin.ImageFileDirectory()
|
||||||
data = b"abcdabcd"
|
data = b"abcdabcd"
|
||||||
|
|
||||||
|
@ -235,7 +231,6 @@ class TestFileTiff(PillowTestCase):
|
||||||
|
|
||||||
def test_load_double(self):
|
def test_load_double(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
from PIL import TiffImagePlugin
|
|
||||||
ifd = TiffImagePlugin.ImageFileDirectory()
|
ifd = TiffImagePlugin.ImageFileDirectory()
|
||||||
data = b"abcdefghabcdefgh"
|
data = b"abcdefghabcdefgh"
|
||||||
|
|
||||||
|
@ -301,6 +296,7 @@ class TestFileTiff(PillowTestCase):
|
||||||
def test_4bit(self):
|
def test_4bit(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
test_file = "Tests/images/hopper_gray_4bpp.tif"
|
test_file = "Tests/images/hopper_gray_4bpp.tif"
|
||||||
|
original = hopper("L")
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
im = Image.open(test_file)
|
im = Image.open(test_file)
|
||||||
|
@ -308,6 +304,7 @@ class TestFileTiff(PillowTestCase):
|
||||||
# Assert
|
# Assert
|
||||||
self.assertEqual(im.size, (128, 128))
|
self.assertEqual(im.size, (128, 128))
|
||||||
self.assertEqual(im.mode, "L")
|
self.assertEqual(im.mode, "L")
|
||||||
|
self.assert_image_similar(im, original, 7.3)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user