mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
update code style in tests
This commit is contained in:
parent
accc66fb5e
commit
5b24987fc3
|
@ -268,27 +268,33 @@ class TestLibUnpack(PillowTestCase):
|
||||||
self.assert_unpack("RGB", "B", 1, (0, 0, 1), (0, 0, 2), (0, 0, 3))
|
self.assert_unpack("RGB", "B", 1, (0, 0, 1), (0, 0, 2), (0, 0, 3))
|
||||||
|
|
||||||
def test_RGBA(self):
|
def test_RGBA(self):
|
||||||
self.assert_unpack("RGBA", "LA", 2, (1, 1, 1, 2), (3, 3, 3, 4), (5, 5, 5, 6))
|
self.assert_unpack(
|
||||||
self.assert_unpack("RGBA", "LA;16B", 4,
|
"RGBA", "LA", 2, (1, 1, 1, 2), (3, 3, 3, 4), (5, 5, 5, 6))
|
||||||
(1, 1, 1, 3), (5, 5, 5, 7), (9, 9, 9, 11))
|
self.assert_unpack(
|
||||||
self.assert_unpack("RGBA", "RGBA", 4,
|
"RGBA", "LA;16B", 4, (1, 1, 1, 3), (5, 5, 5, 7), (9, 9, 9, 11))
|
||||||
(1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12))
|
self.assert_unpack(
|
||||||
self.assert_unpack("RGBA", "RGBAX", 5,
|
"RGBA", "RGBA", 4, (1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12))
|
||||||
(1, 2, 3, 4), (6, 7, 8, 9), (11, 12, 13, 14))
|
self.assert_unpack(
|
||||||
self.assert_unpack("RGBA", "RGBAXX", 6,
|
"RGBA", "RGBAX", 5, (1, 2, 3, 4), (6, 7, 8, 9), (11, 12, 13, 14))
|
||||||
(1, 2, 3, 4), (7, 8, 9, 10), (13, 14, 15, 16))
|
self.assert_unpack(
|
||||||
self.assert_unpack("RGBA", "RGBa", 4,
|
"RGBA", "RGBAXX", 6, (1, 2, 3, 4), (7, 8, 9, 10), (13, 14, 15, 16))
|
||||||
|
self.assert_unpack(
|
||||||
|
"RGBA", "RGBa", 4,
|
||||||
(63, 127, 191, 4), (159, 191, 223, 8), (191, 212, 233, 12))
|
(63, 127, 191, 4), (159, 191, 223, 8), (191, 212, 233, 12))
|
||||||
self.assert_unpack("RGBA", "RGBa",
|
self.assert_unpack(
|
||||||
|
"RGBA", "RGBa",
|
||||||
b'\x01\x02\x03\x00\x10\x20\x30\x7f\x10\x20\x30\xff',
|
b'\x01\x02\x03\x00\x10\x20\x30\x7f\x10\x20\x30\xff',
|
||||||
(0, 0, 0, 0), (32, 64, 96, 127), (16, 32, 48, 255))
|
(0, 0, 0, 0), (32, 64, 96, 127), (16, 32, 48, 255))
|
||||||
self.assert_unpack("RGBA", "RGBaX",
|
self.assert_unpack(
|
||||||
|
"RGBA", "RGBaX",
|
||||||
b'\x01\x02\x03\x00-\x10\x20\x30\x7f-\x10\x20\x30\xff-',
|
b'\x01\x02\x03\x00-\x10\x20\x30\x7f-\x10\x20\x30\xff-',
|
||||||
(0, 0, 0, 0), (32, 64, 96, 127), (16, 32, 48, 255))
|
(0, 0, 0, 0), (32, 64, 96, 127), (16, 32, 48, 255))
|
||||||
self.assert_unpack("RGBA", "RGBaXX",
|
self.assert_unpack(
|
||||||
|
"RGBA", "RGBaXX",
|
||||||
b'\x01\x02\x03\x00==\x10\x20\x30\x7f!!\x10\x20\x30\xff??',
|
b'\x01\x02\x03\x00==\x10\x20\x30\x7f!!\x10\x20\x30\xff??',
|
||||||
(0, 0, 0, 0), (32, 64, 96, 127), (16, 32, 48, 255))
|
(0, 0, 0, 0), (32, 64, 96, 127), (16, 32, 48, 255))
|
||||||
self.assert_unpack("RGBA", "RGBa;16L", 8,
|
self.assert_unpack(
|
||||||
|
"RGBA", "RGBa;16L", 8,
|
||||||
(63, 127, 191, 8), (159, 191, 223, 16), (191, 212, 233, 24))
|
(63, 127, 191, 8), (159, 191, 223, 16), (191, 212, 233, 24))
|
||||||
self.assert_unpack("RGBA", "RGBa;16L",
|
self.assert_unpack("RGBA", "RGBa;16L",
|
||||||
b'\x88\x01\x88\x02\x88\x03\x88\x00'
|
b'\x88\x01\x88\x02\x88\x03\x88\x00'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user