mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
using skip known bad
This commit is contained in:
parent
75dac32a0a
commit
94ca2b1076
|
@ -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")
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue
Block a user