Test NotImplementedError

This commit is contained in:
hugovk 2016-01-06 11:59:47 +02:00
parent 02ec83ee64
commit 517cbbff08

View File

@ -3,6 +3,7 @@ from helper import unittest, PillowTestCase
from PIL import Image, DdsImagePlugin from PIL import Image, DdsImagePlugin
TEST_FILE_DXT1 = "Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds" TEST_FILE_DXT1 = "Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds"
TEST_FILE_DXT3 = "Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.dds"
TEST_FILE_DXT5 = "Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.dds" TEST_FILE_DXT5 = "Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.dds"
@ -24,6 +25,10 @@ class TestFileCur(PillowTestCase):
self.assertEqual(im.size, (256, 256)) self.assertEqual(im.size, (256, 256))
self.assertIsInstance(im, DdsImagePlugin.DdsImageFile) self.assertIsInstance(im, DdsImagePlugin.DdsImageFile)
def test_sanity_dxt3(self):
self.assertRaises(NotImplementedError,
lambda: Image.open(TEST_FILE_DXT3))
def test__validate_true(self): def test__validate_true(self):
# Arrange # Arrange
prefix = b"DDS etc" prefix = b"DDS etc"