mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 13:14:27 +03:00
[Test] class names should be CamelCase
This commit is contained in:
parent
fe4c859fc1
commit
fca64bc0d3
|
@ -324,7 +324,7 @@ def is_mingw():
|
|||
return sysconfig.get_platform() == "mingw"
|
||||
|
||||
|
||||
class cached_property:
|
||||
class CachedProperty:
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from PIL import Image
|
||||
|
||||
from .helper import assert_image_equal, cached_property
|
||||
from .helper import CachedProperty, assert_image_equal
|
||||
|
||||
|
||||
class TestImagingPaste:
|
||||
|
@ -34,7 +34,7 @@ class TestImagingPaste:
|
|||
im.paste(im2, mask)
|
||||
self.assert_9points_image(im, expected)
|
||||
|
||||
@cached_property
|
||||
@CachedProperty
|
||||
def mask_1(self):
|
||||
mask = Image.new("1", (self.size, self.size))
|
||||
px = mask.load()
|
||||
|
@ -43,11 +43,11 @@ class TestImagingPaste:
|
|||
px[y, x] = (x + y) % 2
|
||||
return mask
|
||||
|
||||
@cached_property
|
||||
@CachedProperty
|
||||
def mask_L(self):
|
||||
return self.gradient_L.transpose(Image.Transpose.ROTATE_270)
|
||||
|
||||
@cached_property
|
||||
@CachedProperty
|
||||
def gradient_L(self):
|
||||
gradient = Image.new("L", (self.size, self.size))
|
||||
px = gradient.load()
|
||||
|
@ -56,7 +56,7 @@ class TestImagingPaste:
|
|||
px[y, x] = (x + y) % 255
|
||||
return gradient
|
||||
|
||||
@cached_property
|
||||
@CachedProperty
|
||||
def gradient_RGB(self):
|
||||
return Image.merge(
|
||||
"RGB",
|
||||
|
@ -67,7 +67,7 @@ class TestImagingPaste:
|
|||
],
|
||||
)
|
||||
|
||||
@cached_property
|
||||
@CachedProperty
|
||||
def gradient_LA(self):
|
||||
return Image.merge(
|
||||
"LA",
|
||||
|
@ -77,7 +77,7 @@ class TestImagingPaste:
|
|||
],
|
||||
)
|
||||
|
||||
@cached_property
|
||||
@CachedProperty
|
||||
def gradient_RGBA(self):
|
||||
return Image.merge(
|
||||
"RGBA",
|
||||
|
@ -89,7 +89,7 @@ class TestImagingPaste:
|
|||
],
|
||||
)
|
||||
|
||||
@cached_property
|
||||
@CachedProperty
|
||||
def gradient_RGBa(self):
|
||||
return Image.merge(
|
||||
"RGBa",
|
||||
|
|
|
@ -174,7 +174,7 @@ def test_overflow_segfault():
|
|||
# through to the sequence. Seeing this on 32-bit Windows.
|
||||
with pytest.raises((TypeError, MemoryError)):
|
||||
# post patch, this fails with a memory error
|
||||
x = evil()
|
||||
x = Evil()
|
||||
|
||||
# This fails due to the invalid malloc above,
|
||||
# and segfaults
|
||||
|
@ -182,7 +182,7 @@ def test_overflow_segfault():
|
|||
x[i] = b"0" * 16
|
||||
|
||||
|
||||
class evil:
|
||||
class Evil:
|
||||
def __init__(self):
|
||||
self.corrupt = Image.core.path(0x4000000000000000)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user