mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #802 from hugovk/SunImagePlugin
Sanity test for SunImagePlugin.py
This commit is contained in:
commit
c22c8eefcc
|
@ -29,6 +29,7 @@ i32 = _binary.i32be
|
|||
def _accept(prefix):
|
||||
return i32(prefix) == 0x59a66a95
|
||||
|
||||
|
||||
##
|
||||
# Image plugin for Sun raster files.
|
||||
|
||||
|
|
BIN
Tests/images/lena.ras
Normal file
BIN
Tests/images/lena.ras
Normal file
Binary file not shown.
23
Tests/test_file_sun.py
Normal file
23
Tests/test_file_sun.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
from helper import unittest, PillowTestCase
|
||||
|
||||
from PIL import Image
|
||||
|
||||
|
||||
class TestFileSun(PillowTestCase):
|
||||
|
||||
def test_sanity(self):
|
||||
# Arrange
|
||||
# Created with ImageMagick: convert lena.ppm lena.ras
|
||||
test_file = "Tests/images/lena.ras"
|
||||
|
||||
# Act
|
||||
im = Image.open(test_file)
|
||||
|
||||
# Assert
|
||||
self.assertEqual(im.size, (128, 128))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
# End of file
|
Loading…
Reference in New Issue
Block a user