diff --git a/Tests/images/unimplemented_dxgi_format.dds b/Tests/images/unimplemented_dxgi_format.dds new file mode 100644 index 000000000..5ecb42006 Binary files /dev/null and b/Tests/images/unimplemented_dxgi_format.dds differ diff --git a/Tests/images/unimplemented_pixel_format.dds b/Tests/images/unimplemented_pixel_format.dds new file mode 100755 index 000000000..41a343886 Binary files /dev/null and b/Tests/images/unimplemented_pixel_format.dds differ diff --git a/Tests/test_file_dds.py b/Tests/test_file_dds.py index 222e6efa7..605c5f69b 100644 --- a/Tests/test_file_dds.py +++ b/Tests/test_file_dds.py @@ -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")