mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
fix tests test_I16
This commit is contained in:
parent
d33eab504d
commit
a812f6c480
|
@ -344,10 +344,15 @@ class TestLibUnpack(PillowTestCase):
|
||||||
self.assert_unpack("I;16", "I;16", 2, 0x0201, 0x0403, 0x0605)
|
self.assert_unpack("I;16", "I;16", 2, 0x0201, 0x0403, 0x0605)
|
||||||
self.assert_unpack("I;16B", "I;16B", 2, 0x0102, 0x0304, 0x0506)
|
self.assert_unpack("I;16B", "I;16B", 2, 0x0102, 0x0304, 0x0506)
|
||||||
self.assert_unpack("I;16L", "I;16L", 2, 0x0201, 0x0403, 0x0605)
|
self.assert_unpack("I;16L", "I;16L", 2, 0x0201, 0x0403, 0x0605)
|
||||||
self.assert_unpack("I;16", "I;16N", 2, 0x0201, 0x0403, 0x0605)
|
|
||||||
self.assert_unpack("I;16B", "I;16N", 2, 0x0201, 0x0403, 0x0605)
|
|
||||||
self.assert_unpack("I;16L", "I;16N", 2, 0x0201, 0x0403, 0x0605)
|
|
||||||
self.assert_unpack("I;16", "I;12", 2, 0x0010, 0x0203, 0x0040, 0x0506)
|
self.assert_unpack("I;16", "I;12", 2, 0x0010, 0x0203, 0x0040, 0x0506)
|
||||||
|
if sys.byteorder == 'little':
|
||||||
|
self.assert_unpack("I;16", "I;16N", 2, 0x0201, 0x0403, 0x0605)
|
||||||
|
self.assert_unpack("I;16B", "I;16N", 2, 0x0201, 0x0403, 0x0605)
|
||||||
|
self.assert_unpack("I;16L", "I;16N", 2, 0x0201, 0x0403, 0x0605)
|
||||||
|
else:
|
||||||
|
self.assert_unpack("I;16", "I;16N", 2, 0x0102, 0x0304, 0x0506)
|
||||||
|
self.assert_unpack("I;16B", "I;16N", 2, 0x0102, 0x0304, 0x0506)
|
||||||
|
self.assert_unpack("I;16L", "I;16N", 2, 0x0102, 0x0304, 0x0506)
|
||||||
|
|
||||||
def test_value_error(self):
|
def test_value_error(self):
|
||||||
self.assertRaises(ValueError, self.assert_unpack, "L", "L", 0, 0)
|
self.assertRaises(ValueError, self.assert_unpack, "L", "L", 0, 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user