mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 13:40:54 +03:00
Convert large_memory_test.py to use unittest (and change second XDIM on line 30 to YDIM)
This commit is contained in:
parent
3b3fc441b1
commit
c6386a294d
|
@ -1,4 +1,4 @@
|
||||||
from tester import *
|
from helper import *
|
||||||
|
|
||||||
# This test is not run automatically.
|
# This test is not run automatically.
|
||||||
#
|
#
|
||||||
|
@ -6,22 +6,31 @@ from tester import *
|
||||||
# second test. Running this automatically would amount to a denial of
|
# second test. Running this automatically would amount to a denial of
|
||||||
# service on our testing infrastructure. I expect this test to fail
|
# service on our testing infrastructure. I expect this test to fail
|
||||||
# on any 32 bit machine, as well as any smallish things (like
|
# on any 32 bit machine, as well as any smallish things (like
|
||||||
# raspberrypis). It does succeed on a 3gb Ubuntu 12.04x64 VM on python
|
# Raspberry Pis). It does succeed on a 3gb Ubuntu 12.04x64 VM on Python
|
||||||
# 2.7 an 3.2
|
# 2.7 an 3.2.
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
ydim = 32769
|
YDIM = 32769
|
||||||
xdim = 48000
|
XDIM = 48000
|
||||||
f = tempfile('temp.png')
|
|
||||||
|
|
||||||
def _write_png(xdim,ydim):
|
|
||||||
im = Image.new('L',(xdim,ydim),(0))
|
class TestImage(PillowTestCase):
|
||||||
|
|
||||||
|
def _write_png(self, XDIM, YDIM):
|
||||||
|
f = self.tempfile('temp.png')
|
||||||
|
im = Image.new('L', (XDIM, YDIM), (0))
|
||||||
im.save(f)
|
im.save(f)
|
||||||
success()
|
|
||||||
|
|
||||||
def test_large():
|
def test_large(self):
|
||||||
""" succeeded prepatch"""
|
""" succeeded prepatch"""
|
||||||
_write_png(xdim,ydim)
|
self._write_png(XDIM, YDIM)
|
||||||
def test_2gpx():
|
|
||||||
|
def test_2gpx(self):
|
||||||
"""failed prepatch"""
|
"""failed prepatch"""
|
||||||
_write_png(xdim,xdim)
|
self._write_png(XDIM, XDIM)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
|
|
||||||
|
# End of file
|
||||||
|
|
Loading…
Reference in New Issue
Block a user