mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
25 lines
531 B
Python
25 lines
531 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()
|