update code style in tests

This commit is contained in:
Alexander 2018-09-05 17:51:41 +03:00
parent accc66fb5e
commit 5b24987fc3

View File

@ -268,27 +268,33 @@ class TestLibUnpack(PillowTestCase):
self.assert_unpack("RGB", "B", 1, (0, 0, 1), (0, 0, 2), (0, 0, 3))
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("RGBA", "LA;16B", 4,
(1, 1, 1, 3), (5, 5, 5, 7), (9, 9, 9, 11))
self.assert_unpack("RGBA", "RGBA", 4,
(1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12))
self.assert_unpack("RGBA", "RGBAX", 5,
(1, 2, 3, 4), (6, 7, 8, 9), (11, 12, 13, 14))
self.assert_unpack("RGBA", "RGBAXX", 6,
(1, 2, 3, 4), (7, 8, 9, 10), (13, 14, 15, 16))
self.assert_unpack("RGBA", "RGBa", 4,
self.assert_unpack(
"RGBA", "LA", 2, (1, 1, 1, 2), (3, 3, 3, 4), (5, 5, 5, 6))
self.assert_unpack(
"RGBA", "LA;16B", 4, (1, 1, 1, 3), (5, 5, 5, 7), (9, 9, 9, 11))
self.assert_unpack(
"RGBA", "RGBA", 4, (1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12))
self.assert_unpack(
"RGBA", "RGBAX", 5, (1, 2, 3, 4), (6, 7, 8, 9), (11, 12, 13, 14))
self.assert_unpack(
"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))
self.assert_unpack("RGBA", "RGBa",
self.assert_unpack(
"RGBA", "RGBa",
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))
self.assert_unpack("RGBA", "RGBaX",
self.assert_unpack(
"RGBA", "RGBaX",
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))
self.assert_unpack("RGBA", "RGBaXX",
self.assert_unpack(
"RGBA", "RGBaXX",
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))
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))
self.assert_unpack("RGBA", "RGBa;16L",
b'\x88\x01\x88\x02\x88\x03\x88\x00'