From d524664215bbed37ee175a38b867958494684153 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 17 May 2018 21:42:20 +0300 Subject: [PATCH] Re-enable test for PyPy, we're long past 5.3.1 --- Tests/test_numpy.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index 3f9586513..4ccd35862 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -1,7 +1,6 @@ from __future__ import print_function -import sys -from helper import unittest, PillowTestCase, hopper +from helper import PillowTestCase, hopper, unittest from PIL import Image try: @@ -15,13 +14,6 @@ except ImportError: TEST_IMAGE_SIZE = (10, 10) -# Numpy on pypy as of pypy 5.3.1 is corrupting the numpy.array(Image) -# call such that it's returning a object of type numpy.ndarray, but -# the repr is that of a PIL.Image. Size and shape are 1 and (), not the -# size and shape of the array. This causes failures in several tests. -SKIP_NUMPY_ON_PYPY = hasattr(sys, 'pypy_version_info') and ( - sys.pypy_version_info <= (5, 3, 1, 'final', 0)) - class TestNumpy(PillowTestCase): @@ -121,7 +113,6 @@ class TestNumpy(PillowTestCase): for y in range(0, img.size[1], int(img.size[1]/10)): self.assert_deep_equal(px[x, y], np[y, x]) - @unittest.skipIf(SKIP_NUMPY_ON_PYPY, "numpy.array(Image) is flaky on PyPy") def test_16bit(self): img = Image.open('Tests/images/16bit.cropped.tif') np_img = numpy.array(img) @@ -152,7 +143,6 @@ class TestNumpy(PillowTestCase): img_px = img.load() self.assertEqual(img_px[0, 0], pixel_value) - @unittest.skipIf(SKIP_NUMPY_ON_PYPY, "numpy.array(Image) is flaky on PyPy") def test_to_array(self): def _to_array(mode, dtype):