mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 02:36:17 +03:00
CR feedback: don't use lambda
This commit is contained in:
parent
885297d21f
commit
5f2fe6083c
|
@ -327,8 +327,7 @@ class TestFilePng(PillowTestCase):
|
||||||
broken_crc_chunk_data = chunk_data[:-1] + b'q' # break CRC
|
broken_crc_chunk_data = chunk_data[:-1] + b'q' # break CRC
|
||||||
|
|
||||||
image_data = HEAD + broken_crc_chunk_data + TAIL
|
image_data = HEAD + broken_crc_chunk_data + TAIL
|
||||||
self.assertRaises(SyntaxError,
|
self.assertRaises(SyntaxError, PngImagePlugin.PngImageFile, BytesIO(image_data))
|
||||||
lambda: PngImagePlugin.PngImageFile(BytesIO(image_data)))
|
|
||||||
|
|
||||||
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||||
try:
|
try:
|
||||||
|
@ -344,8 +343,7 @@ class TestFilePng(PillowTestCase):
|
||||||
|
|
||||||
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||||
try:
|
try:
|
||||||
self.assertRaises(SyntaxError,
|
self.assertRaises(SyntaxError, PngImagePlugin.PngImageFile, BytesIO(image_data))
|
||||||
lambda: PngImagePlugin.PngImageFile(BytesIO(image_data)))
|
|
||||||
finally:
|
finally:
|
||||||
ImageFile.LOAD_TRUNCATED_IMAGES = False
|
ImageFile.LOAD_TRUNCATED_IMAGES = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user