mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
qtables error handling tests
This commit is contained in:
parent
d6c16aa015
commit
306ad74324
|
@ -295,6 +295,21 @@ class TestFileJpeg(PillowTestCase):
|
|||
1: standard_chrominance_qtable}),
|
||||
30)
|
||||
|
||||
# not a sequence
|
||||
self.assertRaises(Exception, lambda: self.roundtrip(im, qtables='a'))
|
||||
# sequence wrong length
|
||||
self.assertRaises(Exception, lambda: self.roundtrip(im, qtables=[]))
|
||||
# sequence wrong length
|
||||
self.assertRaises(Exception, lambda: self.roundtrip(im, qtables=[1,2,3,4,5]))
|
||||
|
||||
# qtable entry not a sequence
|
||||
self.assertRaises(Exception, lambda: self.roundtrip(im, qtables=[1]))
|
||||
# qtable entry has wrong number of items
|
||||
self.assertRaises(Exception, lambda: self.roundtrip(im, qtables=[[1,2,3,4]]))
|
||||
|
||||
|
||||
|
||||
|
||||
@unittest.skipUnless(djpeg_available(), "djpeg not available")
|
||||
def test_load_djpeg(self):
|
||||
img = Image.open(TEST_FILE)
|
||||
|
|
Loading…
Reference in New Issue
Block a user