mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-14 17:24:46 +03:00
change list literals to tuple literals
This commit is contained in:
parent
d5757c2906
commit
cfb48672bd
|
@ -530,7 +530,7 @@ class TestImage:
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"wrong_mode",
|
"wrong_mode",
|
||||||
[
|
(
|
||||||
"bad",
|
"bad",
|
||||||
"I;16N",
|
"I;16N",
|
||||||
# "LAB",
|
# "LAB",
|
||||||
|
@ -538,7 +538,7 @@ class TestImage:
|
||||||
"BGR;16",
|
"BGR;16",
|
||||||
"BGR;24",
|
"BGR;24",
|
||||||
"BGR;32",
|
"BGR;32",
|
||||||
],
|
),
|
||||||
)
|
)
|
||||||
def test_linear_gradient_wrong_mode(self, wrong_mode):
|
def test_linear_gradient_wrong_mode(self, wrong_mode):
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
|
@ -546,7 +546,7 @@ class TestImage:
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"mode,pixel_a,pixel_b",
|
"mode,pixel_a,pixel_b",
|
||||||
[
|
(
|
||||||
("1", 0, 255),
|
("1", 0, 255),
|
||||||
("P", 0, 255),
|
("P", 0, 255),
|
||||||
("PA", (0, 255), (255, 255)),
|
("PA", (0, 255), (255, 255)),
|
||||||
|
@ -565,7 +565,7 @@ class TestImage:
|
||||||
("CMYK", (0, 0, 0, 255), (0, 0, 0, 0)),
|
("CMYK", (0, 0, 0, 255), (0, 0, 0, 0)),
|
||||||
("YCbCr", (0, 128, 128), (255, 128, 128)),
|
("YCbCr", (0, 128, 128), (255, 128, 128)),
|
||||||
("HSV", (0, 0, 0), (0, 0, 255)),
|
("HSV", (0, 0, 0), (0, 0, 255)),
|
||||||
],
|
),
|
||||||
)
|
)
|
||||||
def test_linear_gradient(self, mode, pixel_a, pixel_b):
|
def test_linear_gradient(self, mode, pixel_a, pixel_b):
|
||||||
# Arrange
|
# Arrange
|
||||||
|
@ -585,7 +585,7 @@ class TestImage:
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"wrong_mode",
|
"wrong_mode",
|
||||||
[
|
(
|
||||||
"bad",
|
"bad",
|
||||||
"I;16N",
|
"I;16N",
|
||||||
# "LAB",
|
# "LAB",
|
||||||
|
@ -593,7 +593,7 @@ class TestImage:
|
||||||
"BGR;16",
|
"BGR;16",
|
||||||
"BGR;24",
|
"BGR;24",
|
||||||
"BGR;32",
|
"BGR;32",
|
||||||
],
|
),
|
||||||
)
|
)
|
||||||
def test_radial_gradient_wrong_mode(self, wrong_mode):
|
def test_radial_gradient_wrong_mode(self, wrong_mode):
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
|
@ -601,7 +601,7 @@ class TestImage:
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"mode,pixel_a,pixel_b",
|
"mode,pixel_a,pixel_b",
|
||||||
[
|
(
|
||||||
("1", 255, 0),
|
("1", 255, 0),
|
||||||
("P", 255, 0),
|
("P", 255, 0),
|
||||||
("PA", (255, 255), (0, 255)),
|
("PA", (255, 255), (0, 255)),
|
||||||
|
@ -620,7 +620,7 @@ class TestImage:
|
||||||
("CMYK", (0, 0, 0, 0), (0, 0, 0, 255)),
|
("CMYK", (0, 0, 0, 0), (0, 0, 0, 255)),
|
||||||
("YCbCr", (255, 128, 128), (0, 128, 128)),
|
("YCbCr", (255, 128, 128), (0, 128, 128)),
|
||||||
("HSV", (0, 0, 255), (0, 0, 0)),
|
("HSV", (0, 0, 255), (0, 0, 0)),
|
||||||
],
|
),
|
||||||
)
|
)
|
||||||
def test_radial_gradient(self, mode, pixel_a, pixel_b):
|
def test_radial_gradient(self, mode, pixel_a, pixel_b):
|
||||||
# Arrange
|
# Arrange
|
||||||
|
@ -971,7 +971,7 @@ class TestImage:
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"path",
|
"path",
|
||||||
[
|
(
|
||||||
"fli_overrun.bin",
|
"fli_overrun.bin",
|
||||||
"sgi_overrun.bin",
|
"sgi_overrun.bin",
|
||||||
"sgi_overrun_expandrow.bin",
|
"sgi_overrun_expandrow.bin",
|
||||||
|
@ -980,7 +980,7 @@ class TestImage:
|
||||||
"pcx_overrun2.bin",
|
"pcx_overrun2.bin",
|
||||||
"ossfuzz-4836216264589312.pcx",
|
"ossfuzz-4836216264589312.pcx",
|
||||||
"01r_00.pcx",
|
"01r_00.pcx",
|
||||||
],
|
),
|
||||||
)
|
)
|
||||||
def test_overrun(self, path):
|
def test_overrun(self, path):
|
||||||
"""For overrun completeness, test as:
|
"""For overrun completeness, test as:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user