2018-02-17 03:46:29 +03:00
|
|
|
from PIL import Image
|
|
|
|
|
2019-01-13 20:00:12 +03:00
|
|
|
from .helper import PillowTestCase, unittest
|
2018-02-17 03:46:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
class TestFileBlp(PillowTestCase):
|
2018-02-18 07:24:39 +03:00
|
|
|
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)
|
|
|
|
|
2018-02-17 03:46:29 +03:00
|
|
|
def test_load_blp2_dxt1(self):
|
2018-02-18 07:24:39 +03:00
|
|
|
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)
|
|
|
|
|
2018-02-17 03:46:29 +03:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
unittest.main()
|