Pillow/Tests/test_image_getim.py
2016-01-03 13:04:04 -08:00

27 lines
546 B
Python

from helper import unittest, PillowTestCase, hopper, py3
import sys
class TestImageGetIm(PillowTestCase):
def test_sanity(self):
im = hopper()
type_repr = repr(type(im.getim()))
if py3:
self.assertIn("PyCapsule", type_repr)
if sys.hexversion < 0x2070000:
# py2.6 x64, windows
target_types = (int, long)
else:
target_types = (int)
self.assertIsInstance(im.im.id, target_types)
if __name__ == '__main__':
unittest.main()
# End of file