mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-08 14:24:46 +03:00
Move test_no_resource_warning_for_numpy_array to test_numpy so it can be skipped easily
This commit is contained in:
parent
908392206e
commit
08f285d79b
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user