2014-07-07 21:03:50 +04:00
|
|
|
from helper import unittest, PillowTestCase
|
2012-10-16 00:26:38 +04:00
|
|
|
|
|
|
|
try:
|
|
|
|
from PIL import ImageGrab
|
|
|
|
|
2014-07-19 21:21:18 +04:00
|
|
|
class TestImageGrab(PillowTestCase):
|
2012-10-16 00:26:38 +04:00
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
def test_grab(self):
|
|
|
|
im = ImageGrab.grab()
|
|
|
|
self.assert_image(im, im.mode, im.size)
|
2012-10-16 00:26:38 +04:00
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
def test_grab2(self):
|
|
|
|
im = ImageGrab.grab()
|
|
|
|
self.assert_image(im, im.mode, im.size)
|
|
|
|
|
|
|
|
except ImportError:
|
2014-07-19 21:21:18 +04:00
|
|
|
class TestImageGrab(PillowTestCase):
|
2014-06-10 13:10:47 +04:00
|
|
|
def test_skip(self):
|
|
|
|
self.skipTest("ImportError")
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|
|
|
|
|
|
|
|
# End of file
|