Remove unused tearDownModule

This commit is contained in:
hugovk 2014-07-07 20:03:50 +03:00
parent 7dc2975cea
commit cf04a9a0d2
100 changed files with 114 additions and 113 deletions

View File

@ -5,22 +5,19 @@ from __future__ import print_function
import sys import sys
import tempfile import tempfile
import os import os
import glob
if sys.version_info[:2] <= (2, 6): if sys.version_info[:2] <= (2, 6):
import unittest2 as unittest import unittest2 as unittest
else: else:
import unittest import unittest
def tearDownModule():
#remove me later
pass
class PillowTestCase(unittest.TestCase): class PillowTestCase(unittest.TestCase):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
unittest.TestCase.__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): def run(self, result=None):
self.currentResult = result # remember result for use later self.currentResult = result # remember result for use later
@ -40,7 +37,7 @@ class PillowTestCase(unittest.TestCase):
except OSError: except OSError:
pass # report? pass # report?
else: 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): def assert_almost_equal(self, a, b, msg=None, eps=1e-6):
self.assertLess( self.assertLess(
@ -134,7 +131,7 @@ class PillowTestCase(unittest.TestCase):
if platform is not None: if platform is not None:
skip = sys.platform.startswith(platform) skip = sys.platform.startswith(platform)
if travis is not None: 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: if skip:
self.skipTest(msg or "Known Bad Test") self.skipTest(msg or "Known Bad Test")
@ -210,15 +207,19 @@ def command_succeeds(cmd):
return False return False
return True return True
def djpeg_available(): def djpeg_available():
return command_succeeds(['djpeg', '--help']) return command_succeeds(['djpeg', '--help'])
def cjpeg_available(): def cjpeg_available():
return command_succeeds(['cjpeg', '--help']) return command_succeeds(['cjpeg', '--help'])
def netpbm_available(): def netpbm_available():
return command_succeeds(["ppmquant", "--help"]) and \ return (command_succeeds(["ppmquant", "--help"]) and
command_succeeds(["ppmtogif", "--help"]) command_succeeds(["ppmtogif", "--help"]))
def imagemagick_available(): def imagemagick_available():
return command_succeeds(['convert', '-version']) return command_succeeds(['convert', '-version'])

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
import PIL import PIL
import PIL.Image import PIL.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 Image
import os import os

View File

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

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
from PIL import Image 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 Image
import io import io

View File

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

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
from PIL import Image 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 Image
from PIL import GifImagePlugin 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 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 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 from helper import djpeg_available, cjpeg_available
import random import random

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
from PIL import Image from PIL import Image
from io import BytesIO 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 import os

View File

@ -1,4 +1,4 @@
from helper import unittest, tearDownModule from helper import unittest
from PIL import Image 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 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 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 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 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 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 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 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 Image
from PIL import SpiderImagePlugin 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 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 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 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 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 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 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 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 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 Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
from PIL import FontFile, BdfFontFile 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 Image, FontFile, PcfFontFile
from PIL import ImageFont, ImageDraw 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 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 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 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 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 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 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 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 Image
from PIL import ImageFilter 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 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 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 Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena from helper import unittest, PillowTestCase, lena
class TestImageGetColors(PillowTestCase): 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): 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): 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): 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): class TestImageGetPalette(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 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 Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena from helper import unittest, PillowTestCase, lena
class TestImageHistogram(PillowTestCase): 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 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 Image

View File

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

View File

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

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
from PIL import Image 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 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 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 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 Image

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena from helper import unittest, PillowTestCase, lena
class TestImageResize(PillowTestCase): 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): 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 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): 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): 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 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 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 Image
from PIL import ImageChops 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 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 Image
from PIL import ImageColor 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 Image
from PIL import ImageColor 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 Image
from PIL import ImageEnhance 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 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 Image
from PIL import ImageFileIO 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 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 Image
from PIL import ImageDraw from PIL import ImageDraw

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
try: try:
from PIL import ImageGrab 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 Image
from PIL import ImageMath 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 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 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 Image
from PIL import ImageOps 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 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 from PIL import ImagePath

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule, lena from helper import unittest, PillowTestCase, lena
try: try:
from PIL import ImageQt 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 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 Image
from PIL import ImageShow 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 Image
from PIL import ImageStat from PIL import ImageStat

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
class TestImageTk(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 Image
from PIL import ImageTransform 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 Image
from PIL import ImageWin 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 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 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 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 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 Image

View File

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

View File

@ -1,4 +1,4 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase
from PIL import Image 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 from helper import djpeg_available, cjpeg_available, netpbm_available
import sys import sys