From 2389492f96f8fc82e702a9311b3389f2fbe3a494 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 26 Sep 2018 14:09:31 +0300 Subject: [PATCH] flake8 --- Tests/test_decompression_bomb.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/test_decompression_bomb.py b/Tests/test_decompression_bomb.py index b0b9430d4..0a30e25f1 100644 --- a/Tests/test_decompression_bomb.py +++ b/Tests/test_decompression_bomb.py @@ -6,7 +6,6 @@ TEST_FILE = "Tests/images/hopper.ppm" ORIGINAL_LIMIT = Image.MAX_IMAGE_PIXELS -from PIL.Image import DecompressionBombWarning, DecompressionBombError class TestDecompressionBomb(PillowTestCase): @@ -67,7 +66,7 @@ class TestDecompressionCrop(PillowTestCase): im = Image.new("RGB", (100, 100)) good_values = ((-9999, -9999, -9990, -9990), - (-999, -999, -990, -990)) + (-999, -999, -990, -990)) warning_values = ((-160, -160, 99, 99), (160, 160, -99, -99)) @@ -76,14 +75,15 @@ class TestDecompressionCrop(PillowTestCase): (99909, 99990, -99999, -99999)) for value in good_values: - self.assertEqual(im.crop(value).size, (9,9)) + self.assertEqual(im.crop(value).size, (9, 9)) for value in warning_values: - self.assert_warning(DecompressionBombWarning, im.crop, value) + self.assert_warning(Image.DecompressionBombWarning, im.crop, value) for value in error_values: - with self.assertRaises(DecompressionBombError): + with self.assertRaises(Image.DecompressionBombError): im.crop(value) + if __name__ == '__main__': unittest.main()