From 5f2fe6083caee718d27a844328c49ad93ffcf2c3 Mon Sep 17 00:00:00 2001 From: Konstantin Kopachev Date: Wed, 29 Jun 2016 17:29:55 -0700 Subject: [PATCH] CR feedback: don't use lambda --- Tests/test_file_png.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index e09abb172..d4494cad0 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -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