skip test_jp2_icon test when use PyPy 5.4.1

This commit is contained in:
Fahad Al-Saidi 2016-12-15 10:04:17 +04:00
parent 84febfe666
commit 44e784a95e

View File

@ -4,6 +4,12 @@ from PIL import Image
import sys
# The the default version of PyPy in Trusty is PyPy 5.4.1.
# There is a known error in it: TypeError: PyPy does not yet implement the new buffer interface (issue #2163).
SKIP_5_4_1_PYPY = hasattr(sys, 'pypy_version_info') and (
sys.pypy_version_info >= (5, 4, 1, 'final', 0))
# sample icon file
TEST_FILE = "Tests/images/pillow.icns"
@ -61,6 +67,7 @@ class TestFileIcns(PillowTestCase):
self.assertEqual(im2.mode, 'RGBA')
self.assertEqual(im2.size, (wr, hr))
@unittest.skipIf(SKIP_5_4_1_PYPY, "PyPy does not yet implement the new buffer interface")
def test_jp2_icon(self):
# This icon was made by using Uli Kusterer's oldiconutil to replace
# the PNG images with JPEG 2000 ones. The advantage of doing this is