Skip to content

Commit 597f067

Browse files
authored
Merge pull request #2989 from hugovk/test-wal
Test WalImageFile
2 parents bc192c6 + a852c61 commit 597f067

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

Tests/images/hopper.wal

21.3 KB
Binary file not shown.

Tests/test_file_wal.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from helper import unittest, PillowTestCase
2+
3+
from PIL import WalImageFile
4+
5+
6+
class TestFileWal(PillowTestCase):
7+
8+
def test_open(self):
9+
# Arrange
10+
TEST_FILE = "Tests/images/hopper.wal"
11+
12+
# Act
13+
im = WalImageFile.open(TEST_FILE)
14+
15+
# Assert
16+
self.assertEqual(im.format, "WAL")
17+
self.assertEqual(im.format_description, "Quake2 Texture")
18+
self.assertEqual(im.mode, "P")
19+
self.assertEqual(im.size, (128, 128))
20+
21+
22+
if __name__ == '__main__':
23+
unittest.main()

0 commit comments

Comments
 (0)