Merge pull request #785 from hugovk/remove_tearDownModule

Remove unused tearDownModule()
This commit is contained in:
wiredfool 2014-07-07 11:26:58 -07:00
commit 356e4a8a89
100 changed files with 114 additions and 113 deletions

View File

@ -5,22 +5,19 @@ from __future__ import print_function
import sys
import tempfile
import os
import glob
if sys.version_info[:2] <= (2, 6):
import unittest2 as unittest
else:
import unittest
def tearDownModule():
#remove me later
pass
class PillowTestCase(unittest.TestCase):
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
self.currentResult = None # holds last result object passed to run method
# holds last result object passed to run method:
self.currentResult = None
def run(self, result=None):
self.currentResult = result # remember result for use later
@ -40,7 +37,7 @@ class PillowTestCase(unittest.TestCase):
except OSError:
pass # report?
else:
print("=== orphaned temp file: %s" %path)
print("=== orphaned temp file: %s" % path)
def assert_almost_equal(self, a, b, msg=None, eps=1e-6):
self.assertLess(
@ -134,7 +131,7 @@ class PillowTestCase(unittest.TestCase):
if platform is not None:
skip = sys.platform.startswith(platform)
if travis is not None:
skip = skip and (travis == bool(os.environ.get('TRAVIS',False)))
skip = skip and (travis == bool(os.environ.get('TRAVIS', False)))
if skip:
self.skipTest(msg or "Known Bad Test")
@ -142,8 +139,8 @@ class PillowTestCase(unittest.TestCase):
assert template[:5] in ("temp.", "temp_")
(fd, path) = tempfile.mkstemp(template[4:], template[:4])
os.close(fd)
self.addCleanup(self.delete_tempfile, path)
self.addCleanup(self.delete_tempfile, path)
return path
def open_withImagemagick(self, f):
@ -155,8 +152,8 @@ class PillowTestCase(unittest.TestCase):
from PIL import Image
return Image.open(outfile)
raise IOError()
# helpers
import sys
@ -210,17 +207,21 @@ def command_succeeds(cmd):
return False
return True
def djpeg_available():
return command_succeeds(['djpeg', '--help'])
def cjpeg_available():
return command_succeeds(['cjpeg', '--help'])
def netpbm_available():
return command_succeeds(["ppmquant", "--help"]) and \
command_succeeds(["ppmtogif", "--help"])
return (command_succeeds(["ppmquant", "--help"]) and
command_succeeds(["ppmtogif", "--help"]))
def imagemagick_available():
return command_succeeds(['convert', '-version'])
# End of file

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
import PIL
import PIL.Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image
import os

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
try:
import cffi

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image
import io

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image, EpsImagePlugin
import io

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, netpbm_available
from helper import unittest, PillowTestCase, lena, netpbm_available
from PIL import Image
from PIL import GifImagePlugin

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, py3
from helper import unittest, PillowTestCase, lena, py3
from helper import djpeg_available, cjpeg_available
import random

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image
from io import BytesIO

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, py3
from helper import unittest, PillowTestCase, lena, py3
import os

View File

@ -1,4 +1,4 @@
from helper import unittest, tearDownModule
from helper import unittest
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, imagemagick_available
from helper import unittest, PillowTestCase, lena, imagemagick_available
import os.path

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
import os.path

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from io import BytesIO

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image
from PIL import SpiderImagePlugin

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image, TarIO

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, py3
from helper import unittest, PillowTestCase, lena, py3
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image, TiffImagePlugin, TiffTags

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import FontFile, BdfFontFile

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image, FontFile, PcfFontFile
from PIL import ImageFont, ImageDraw

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, fromstring, tostring
from helper import unittest, PillowTestCase, fromstring, tostring
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image
from PIL import ImageFilter

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageGetColors(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageGetData(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageGetExtrema(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, py3
from helper import unittest, PillowTestCase, lena, py3
class TestImageGetIm(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageGetPalette(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageHistogram(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageOffset(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
import sys

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
import sys

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import ImagePalette

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageResize(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageRotate(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
class TestImageThumbnail(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, fromstring
from helper import unittest, PillowTestCase, lena, fromstring
class TestImageToBitmap(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image
from PIL import ImageChops

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image
from PIL import ImageColor

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image
from PIL import ImageColor

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image
from PIL import ImageEnhance

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, fromstring, tostring
from helper import unittest, PillowTestCase, lena, fromstring, tostring
from io import BytesIO

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena, tostring
from helper import unittest, PillowTestCase, lena, tostring
from PIL import Image
from PIL import ImageFileIO

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import ImageFilter

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image
from PIL import ImageDraw

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
try:
from PIL import ImageGrab

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image
from PIL import ImageMath

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import ImageMode

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import ImageOps

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image
from PIL import ImageOps

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import ImagePalette

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import ImagePath

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
try:
from PIL import ImageQt

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import ImageSequence

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image
from PIL import ImageShow

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image
from PIL import ImageStat

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
class TestImageTk(PillowTestCase):

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image
from PIL import ImageTransform

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image
from PIL import ImageWin

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, py3
from helper import unittest, PillowTestCase, py3
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena
from helper import unittest, PillowTestCase, lena
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
import datetime

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from PIL import Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule
from helper import unittest, PillowTestCase
from helper import djpeg_available, cjpeg_available, netpbm_available
import sys