mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Skip known bad tests
This commit is contained in:
parent
cedd8c2106
commit
08d491f006
|
@ -123,6 +123,21 @@ class PillowTestCase(unittest.TestCase):
|
|||
self.assertTrue(found)
|
||||
return result
|
||||
|
||||
def skipKnownBadTest(self, msg=None, platform=None, travis=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)):
|
||||
print (os.environ.get('PILLOW_RUN_KNOWN_BAD', False))
|
||||
return
|
||||
|
||||
skip = True
|
||||
if platform is not None:
|
||||
skip = sys.platform.startswith(platform)
|
||||
if travis is not None:
|
||||
skip = skip and (travis == bool(os.environ.get('TRAVIS',False)))
|
||||
if skip:
|
||||
self.skipTest(msg or "Known Bad Test")
|
||||
|
||||
def tempfile(self, template):
|
||||
assert template[:5] in ("temp.", "temp_")
|
||||
(fd, path) = tempfile.mkstemp(template[4:], template[:4])
|
||||
|
|
|
@ -44,6 +44,7 @@ class TestFilePalm(PillowTestCase):
|
|||
|
||||
# Act / Assert
|
||||
self.helper_save_as_palm(mode)
|
||||
self.skipKnownBadTest("Palm P image is wrong")
|
||||
self.roundtrip(mode)
|
||||
|
||||
def test_rgb_ioerror(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user