Use cls for classmethods

This commit is contained in:
Hugo van Kemenade 2022-04-10 20:02:34 +03:00
parent 830da5c41e
commit 73cf0cb3d9

View File

@ -70,12 +70,12 @@ class TestDecompressionBomb:
class TestDecompressionCrop: class TestDecompressionCrop:
@classmethod @classmethod
def setup_class(self): def setup_class(cls):
width, height = 128, 128 width, height = 128, 128
Image.MAX_IMAGE_PIXELS = height * width * 4 - 1 Image.MAX_IMAGE_PIXELS = height * width * 4 - 1
@classmethod @classmethod
def teardown_class(self): def teardown_class(cls):
Image.MAX_IMAGE_PIXELS = ORIGINAL_LIMIT Image.MAX_IMAGE_PIXELS = ORIGINAL_LIMIT
def testEnlargeCrop(self): def testEnlargeCrop(self):