using skip known bad

This commit is contained in:
wiredfool 2014-07-23 14:31:49 -07:00
parent 75dac32a0a
commit 94ca2b1076
2 changed files with 8 additions and 8 deletions

View File

@ -124,7 +124,8 @@ class PillowTestCase(unittest.TestCase):
self.assertTrue(found)
return result
def skipKnownBadTest(self, msg=None, platform=None, travis=None):
def skipKnownBadTest(self, msg=None, platform=None,
travis=None, interpreter=None):
# Skip if platform/travis matches, and
# PILLOW_RUN_KNOWN_BAD is not true in the environment.
if bool(os.environ.get('PILLOW_RUN_KNOWN_BAD', False)):
@ -136,6 +137,8 @@ class PillowTestCase(unittest.TestCase):
skip = sys.platform.startswith(platform)
if travis is not None:
skip = skip and (travis == bool(os.environ.get('TRAVIS', False)))
if interpreter is not None:
skip = skip and (interpreter == 'pypy' and hasattr(sys, 'pypy_version_info'))
if skip:
self.skipTest(msg or "Known Bad Test")

View File

@ -5,12 +5,6 @@ import sys
class TestImagePoint(PillowTestCase):
def setUp(self):
if hasattr(sys, 'pypy_version_info'):
# This takes _forever_ on PyPy. Open Bug,
# see https://github.com/python-pillow/Pillow/issues/484
self.skipTest("Too slow on PyPy")
def test_sanity(self):
im = lena()
@ -29,7 +23,10 @@ class TestImagePoint(PillowTestCase):
def test_16bit_lut(self):
""" Tests for 16 bit -> 8 bit lut for converting I->L images
see https://github.com/python-pillow/Pillow/issues/440
"""
"""
# This takes _forever_ on PyPy. Open Bug,
# see https://github.com/python-pillow/Pillow/issues/484
self.skipKnownBadTest(msg="Too Slow on pypy", interpreter='pypy')
im = lena("I")
im.point(list(range(256))*256, 'L')