mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26: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
|
||||
|
||||
image_data = HEAD + broken_crc_chunk_data + TAIL
|
||||
self.assertRaises(SyntaxError,
|
||||
lambda: PngImagePlugin.PngImageFile(BytesIO(image_data)))
|
||||
self.assertRaises(SyntaxError, PngImagePlugin.PngImageFile, BytesIO(image_data))
|
||||
|
||||
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||
try:
|
||||
|
@ -344,8 +343,7 @@ class TestFilePng(PillowTestCase):
|
|||
|
||||
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||
try:
|
||||
self.assertRaises(SyntaxError,
|
||||
lambda: PngImagePlugin.PngImageFile(BytesIO(image_data)))
|
||||
self.assertRaises(SyntaxError, PngImagePlugin.PngImageFile, BytesIO(image_data))
|
||||
finally:
|
||||
ImageFile.LOAD_TRUNCATED_IMAGES = False
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user