mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-14 17:24:46 +03:00
fix indentation
This commit is contained in:
parent
cfb48672bd
commit
41421875ca
|
@ -48,21 +48,20 @@ class TestImage:
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
def test_image_modes_success(self, mode):
|
def test_image_modes_success(self, mode):
|
||||||
Image.new(mode, (1, 1))
|
Image.new(mode, (1, 1))
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"mode", ("", "bad", "very very long", "BGR;15", "BGR;16", "BGR;24", "BGR;32")
|
"mode", ("", "bad", "very very long", "BGR;15", "BGR;16", "BGR;24", "BGR;32")
|
||||||
)
|
)
|
||||||
def test_image_modes_fail(self, mode):
|
def test_image_modes_fail(self, mode):
|
||||||
with pytest.raises(ValueError) as e:
|
with pytest.raises(ValueError) as e:
|
||||||
Image.new(mode, (1, 1))
|
Image.new(mode, (1, 1))
|
||||||
assert str(e.value) == "unrecognized image mode"
|
assert str(e.value) == "unrecognized image mode"
|
||||||
|
|
||||||
def test_exception_inheritance(self):
|
def test_exception_inheritance(self):
|
||||||
assert issubclass(UnidentifiedImageError, OSError)
|
assert issubclass(UnidentifiedImageError, OSError)
|
||||||
|
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
||||||
im = Image.new("L", (100, 100))
|
im = Image.new("L", (100, 100))
|
||||||
assert repr(im)[:45] == "<PIL.Image.Image image mode=L size=100x100 at"
|
assert repr(im)[:45] == "<PIL.Image.Image image mode=L size=100x100 at"
|
||||||
assert im.mode == "L"
|
assert im.mode == "L"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user