Move test_no_resource_warning_for_numpy_array to test_numpy so it can be skipped easily

This commit is contained in:
hugovk 2015-01-01 12:57:43 +02:00
parent 908392206e
commit 08f285d79b
2 changed files with 10 additions and 11 deletions

View File

@ -205,16 +205,6 @@ class TestImage(PillowTestCase):
with Image.open(test_file) as im:
self.assert_warning(None, lambda: im.save('test_img.jpg'))
def test_no_resource_warning_for_numpy_array(self):
# https://github.com/python-pillow/Pillow/issues/835
# Arrange
from numpy import array
test_file = 'Tests/images/hopper.png'
im = Image.open(test_file)
# Act/Assert
self.assert_warning(None, lambda: array(im))
if __name__ == '__main__':
unittest.main()

View File

@ -130,7 +130,16 @@ class TestNumpy(PillowTestCase):
im.putdata(arr)
self.assertEqual(len(im.getdata()),len(arr))
def test_no_resource_warning_for_numpy_array(self):
# https://github.com/python-pillow/Pillow/issues/835
# Arrange
from numpy import array
test_file = 'Tests/images/hopper.png'
im = Image.open(test_file)
# Act/Assert
self.assert_warning(None, lambda: array(im))
if __name__ == '__main__':
unittest.main()