blp: Add more test images

This commit is contained in:
Jerome Leclanche 2018-02-18 06:24:39 +02:00
parent 73d7fff16e
commit 4d685ac0cd
14 changed files with 33 additions and 3 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -4,10 +4,40 @@ from helper import PillowTestCase, unittest
class TestFileBlp(PillowTestCase):
def test_load_blp1_alpha4(self):
im = Image.open("Tests/images/blp/blp1_alpha4.blp")
target = Image.open("Tests/images/blp/blp1_alpha4.png")
self.assert_image_equal(im, target)
def test_load_blp1_alpha5(self):
im = Image.open("Tests/images/blp/blp1_alpha5.blp")
target = Image.open("Tests/images/blp/blp1_alpha5.png")
self.assert_image_equal(im, target)
def test_load_blp2_raw(self):
im = Image.open("Tests/images/blp/blp2_raw.blp")
target = Image.open("Tests/images/blp/blp2_raw.png")
self.assert_image_equal(im, target)
def test_load_blp2_dxt1(self):
im = Image.open("Tests/images/blp2_dxt1.blp")
target = Image.open("Tests/images/blp2_dxt1.png")
self.assert_image_similar(im, target.convert("RGBA"), 15)
im = Image.open("Tests/images/blp/blp2_dxt1.blp")
target = Image.open("Tests/images/blp/blp2_dxt1.png")
self.assert_image_equal(im, target)
def test_load_blp2_dxt1a(self):
im = Image.open("Tests/images/blp/blp2_dxt1a.blp")
target = Image.open("Tests/images/blp/blp2_dxt1a.png")
self.assert_image_equal(im, target)
def test_load_blp2_dxt3(self):
im = Image.open("Tests/images/blp/blp2_dxt3.blp")
target = Image.open("Tests/images/blp/blp2_dxt3.png")
self.assert_image_equal(im, target)
def test_load_blp2_dxt5(self):
im = Image.open("Tests/images/blp/blp2_dxt5.blp")
target = Image.open("Tests/images/blp/blp2_dxt5.png")
self.assert_image_equal(im, target)
if __name__ == "__main__":