Tests that faill on appveyor CI, but pass on a real machine

This commit is contained in:
wiredfool 2015-06-12 09:56:12 -07:00
parent 07eea7be52
commit 0347bcc91d
2 changed files with 5 additions and 1 deletions

View File

@ -233,6 +233,8 @@ def netpbm_available():
def imagemagick_available(): def imagemagick_available():
return IMCONVERT and command_succeeds([IMCONVERT, '-version']) return IMCONVERT and command_succeeds([IMCONVERT, '-version'])
def onAppveyor():
return 'APPVEYOR' in os.environ
if sys.platform == 'win32': if sys.platform == 'win32':
IMCONVERT = os.environ.get('MAGICK_HOME', '') IMCONVERT = os.environ.get('MAGICK_HOME', '')

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase from helper import unittest, PillowTestCase, onAppveyor
import sys import sys
@ -7,10 +7,12 @@ try:
class TestImageGrab(PillowTestCase): class TestImageGrab(PillowTestCase):
@unittest.skipIf(onAppveyor())
def test_grab(self): def test_grab(self):
im = ImageGrab.grab() im = ImageGrab.grab()
self.assert_image(im, im.mode, im.size) self.assert_image(im, im.mode, im.size)
@unittest.skipIf(onAppveyor())
def test_grab2(self): def test_grab2(self):
im = ImageGrab.grab() im = ImageGrab.grab()
self.assert_image(im, im.mode, im.size) self.assert_image(im, im.mode, im.size)