diff --git a/Tests/images/hopper.wal b/Tests/images/hopper.wal new file mode 100644 index 000000000..f6260c6b3 Binary files /dev/null and b/Tests/images/hopper.wal differ diff --git a/Tests/test_file_wal.py b/Tests/test_file_wal.py new file mode 100644 index 000000000..13b1e3a2f --- /dev/null +++ b/Tests/test_file_wal.py @@ -0,0 +1,23 @@ +from helper import unittest, PillowTestCase + +from PIL import WalImageFile + + +class TestFileWal(PillowTestCase): + + def test_open(self): + # Arrange + TEST_FILE = "Tests/images/hopper.wal" + + # Act + im = WalImageFile.open(TEST_FILE) + + # Assert + self.assertEqual(im.format, "WAL") + self.assertEqual(im.format_description, "Quake2 Texture") + self.assertEqual(im.mode, "P") + self.assertEqual(im.size, (128, 128)) + + +if __name__ == '__main__': + unittest.main()