Added tests for unimplemented formats

This commit is contained in:
Andrew Murray 2019-02-23 08:53:45 +11:00
parent 148d320b40
commit bbfbda3d4f
3 changed files with 8 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -68,6 +68,10 @@ class TestFileDds(PillowTestCase):
self.assert_image_equal(target, im)
def test_unimplemented_dxgi_format(self):
self.assertRaises(NotImplementedError, Image.open,
"Tests/images/unimplemented_dxgi_format.dds")
def test_uncompressed_rgb(self):
"""Check uncompressed RGB images can be opened"""
@ -125,3 +129,7 @@ class TestFileDds(PillowTestCase):
im.load()
self.assertRaises(IOError, short_file)
def test_unimplemented_pixel_format(self):
self.assertRaises(NotImplementedError, Image.open,
"Tests/images/unimplemented_pixel_format.dds")