diff --git a/Tests/helper.py b/Tests/helper.py index 7f0aaa73c63..c00e105e461 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -5,22 +5,19 @@ 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 @@ def delete_tempfile(self, path): 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 @@ def skipKnownBadTest(self, msg=None, platform=None, travis=None): 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 @@ def tempfile(self, template): 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 @@ def open_withImagemagick(self, f): 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 diff --git a/Tests/test_000_sanity.py b/Tests/test_000_sanity.py index 1ad76cc501e..22e582ec3f2 100644 --- a/Tests/test_000_sanity.py +++ b/Tests/test_000_sanity.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase import PIL import PIL.Image diff --git a/Tests/test_bmp_reference.py b/Tests/test_bmp_reference.py index c8d93983b48..b45ea76f6e9 100644 --- a/Tests/test_bmp_reference.py +++ b/Tests/test_bmp_reference.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image import os diff --git a/Tests/test_cffi.py b/Tests/test_cffi.py index 8ff4e817f84..b9f99976d37 100644 --- a/Tests/test_cffi.py +++ b/Tests/test_cffi.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena try: import cffi diff --git a/Tests/test_decompression_bomb.py b/Tests/test_decompression_bomb.py index 4c09bd9e332..0803732ce45 100644 --- a/Tests/test_decompression_bomb.py +++ b/Tests/test_decompression_bomb.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py index 2870aba04c2..e04f3642ca1 100644 --- a/Tests/test_file_bmp.py +++ b/Tests/test_file_bmp.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image import io diff --git a/Tests/test_file_eps.py b/Tests/test_file_eps.py index 6a1a1b5e218..0ca4249a33b 100644 --- a/Tests/test_file_eps.py +++ b/Tests/test_file_eps.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image, EpsImagePlugin import io diff --git a/Tests/test_file_fli.py b/Tests/test_file_fli.py index a98a80b78bd..0c1d6e36a46 100644 --- a/Tests/test_file_fli.py +++ b/Tests/test_file_fli.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index e31779df0ca..84f34efb3a6 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -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 diff --git a/Tests/test_file_icns.py b/Tests/test_file_icns.py index f19eb16b7a4..99f6da9e307 100644 --- a/Tests/test_file_icns.py +++ b/Tests/test_file_icns.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_file_ico.py b/Tests/test_file_ico.py index 165d1022533..c3bf7a992af 100644 --- a/Tests/test_file_ico.py +++ b/Tests/test_file_ico.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index 283c48eb794..69c07d2dca5 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -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 diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py index 23564c43410..a0e7dfb53fc 100644 --- a/Tests/test_file_jpeg2k.py +++ b/Tests/test_file_jpeg2k.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image from io import BytesIO diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 1afeee4884c..60eea8b3bba 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena, py3 +from helper import unittest, PillowTestCase, lena, py3 import os diff --git a/Tests/test_file_libtiff_small.py b/Tests/test_file_libtiff_small.py index acc2390c9b2..043ecaf3fec 100644 --- a/Tests/test_file_libtiff_small.py +++ b/Tests/test_file_libtiff_small.py @@ -1,4 +1,4 @@ -from helper import unittest, tearDownModule +from helper import unittest from PIL import Image diff --git a/Tests/test_file_msp.py b/Tests/test_file_msp.py index 2444879d1a6..a64faad1025 100644 --- a/Tests/test_file_msp.py +++ b/Tests/test_file_msp.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_file_palm.py b/Tests/test_file_palm.py index c1947ff376f..388df023711 100644 --- a/Tests/test_file_palm.py +++ b/Tests/test_file_palm.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena, imagemagick_available +from helper import unittest, PillowTestCase, lena, imagemagick_available import os.path diff --git a/Tests/test_file_pcx.py b/Tests/test_file_pcx.py index d0800e2035d..f278bd91dd4 100644 --- a/Tests/test_file_pcx.py +++ b/Tests/test_file_pcx.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_file_pdf.py b/Tests/test_file_pdf.py index 089168393b0..689302bb57e 100644 --- a/Tests/test_file_pdf.py +++ b/Tests/test_file_pdf.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena import os.path diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index 145eff327cb..de96fdf3e90 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from io import BytesIO diff --git a/Tests/test_file_ppm.py b/Tests/test_file_ppm.py index d9e4e06740b..e1f1537d2bd 100644 --- a/Tests/test_file_ppm.py +++ b/Tests/test_file_ppm.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_file_psd.py b/Tests/test_file_psd.py index 00764690127..ee903ce5cd6 100644 --- a/Tests/test_file_psd.py +++ b/Tests/test_file_psd.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_file_spider.py b/Tests/test_file_spider.py index e0731ca8cd8..622bfd62441 100644 --- a/Tests/test_file_spider.py +++ b/Tests/test_file_spider.py @@ -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 diff --git a/Tests/test_file_tar.py b/Tests/test_file_tar.py index 7e36f35fc1f..7010973cee0 100644 --- a/Tests/test_file_tar.py +++ b/Tests/test_file_tar.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image, TarIO diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index ed3d1e9cd5b..72156bb396f 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena, py3 +from helper import unittest, PillowTestCase, lena, py3 from PIL import Image diff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py index 2019f3455a4..e0805b525ad 100644 --- a/Tests/test_file_tiff_metadata.py +++ b/Tests/test_file_tiff_metadata.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image, TiffImagePlugin, TiffTags diff --git a/Tests/test_file_webp.py b/Tests/test_file_webp.py index 1eeea57d36f..ffaf7c6738d 100644 --- a/Tests/test_file_webp.py +++ b/Tests/test_file_webp.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_file_webp_alpha.py b/Tests/test_file_webp_alpha.py index 0df3143bb69..5f8f653cf39 100644 --- a/Tests/test_file_webp_alpha.py +++ b/Tests/test_file_webp_alpha.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_file_webp_lossless.py b/Tests/test_file_webp_lossless.py index 9f8e339de2c..662ad1117b5 100644 --- a/Tests/test_file_webp_lossless.py +++ b/Tests/test_file_webp_lossless.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_file_webp_metadata.py b/Tests/test_file_webp_metadata.py index 2470f4c49f0..6aadf9c7eff 100644 --- a/Tests/test_file_webp_metadata.py +++ b/Tests/test_file_webp_metadata.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_file_xbm.py b/Tests/test_file_xbm.py index d520ef460cb..02aec70b112 100644 --- a/Tests/test_file_xbm.py +++ b/Tests/test_file_xbm.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_file_xpm.py b/Tests/test_file_xpm.py index e6e7502983f..d79f5fbda37 100644 --- a/Tests/test_file_xpm.py +++ b/Tests/test_file_xpm.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_font_bdf.py b/Tests/test_font_bdf.py index ce5a371e0ae..0df8e866bd6 100644 --- a/Tests/test_font_bdf.py +++ b/Tests/test_font_bdf.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import FontFile, BdfFontFile diff --git a/Tests/test_font_pcf.py b/Tests/test_font_pcf.py index 8c4c04cd409..5e9e02c8c61 100644 --- a/Tests/test_font_pcf.py +++ b/Tests/test_font_pcf.py @@ -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 diff --git a/Tests/test_format_lab.py b/Tests/test_format_lab.py index 188b0d1fae4..53468db5fb9 100644 --- a/Tests/test_format_lab.py +++ b/Tests/test_format_lab.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_image.py b/Tests/test_image.py index e41447e42eb..174964ce777 100644 --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_image_array.py b/Tests/test_image_array.py index dce2fa1065a..a0f5f29e191 100644 --- a/Tests/test_image_array.py +++ b/Tests/test_image_array.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_convert.py b/Tests/test_image_convert.py index 1415bae3a3f..01a80732bac 100644 --- a/Tests/test_image_convert.py +++ b/Tests/test_image_convert.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_copy.py b/Tests/test_image_copy.py index 205118e4786..a7882db9439 100644 --- a/Tests/test_image_copy.py +++ b/Tests/test_image_copy.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_crop.py b/Tests/test_image_crop.py index f7ea48c955b..da93fe7c8e2 100644 --- a/Tests/test_image_crop.py +++ b/Tests/test_image_crop.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_draft.py b/Tests/test_image_draft.py index 252e6037649..a76b8d266ea 100644 --- a/Tests/test_image_draft.py +++ b/Tests/test_image_draft.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, fromstring, tostring +from helper import unittest, PillowTestCase, fromstring, tostring from PIL import Image diff --git a/Tests/test_image_filter.py b/Tests/test_image_filter.py index 8c04ebb1dc2..4a85b0a2e16 100644 --- a/Tests/test_image_filter.py +++ b/Tests/test_image_filter.py @@ -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 diff --git a/Tests/test_image_frombytes.py b/Tests/test_image_frombytes.py index abba18852d2..aad8046a1f0 100644 --- a/Tests/test_image_frombytes.py +++ b/Tests/test_image_frombytes.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_getbands.py b/Tests/test_image_getbands.py index 6aadaa502f9..e803abb0288 100644 --- a/Tests/test_image_getbands.py +++ b/Tests/test_image_getbands.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_image_getbbox.py b/Tests/test_image_getbbox.py index f89dcf7ca7f..8d78195bd92 100644 --- a/Tests/test_image_getbbox.py +++ b/Tests/test_image_getbbox.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_getcolors.py b/Tests/test_image_getcolors.py index 7011c344359..d3e5a49897e 100644 --- a/Tests/test_image_getcolors.py +++ b/Tests/test_image_getcolors.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageGetColors(PillowTestCase): diff --git a/Tests/test_image_getdata.py b/Tests/test_image_getdata.py index 71416c4b9b0..ff66595959e 100644 --- a/Tests/test_image_getdata.py +++ b/Tests/test_image_getdata.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageGetData(PillowTestCase): diff --git a/Tests/test_image_getextrema.py b/Tests/test_image_getextrema.py index 7d896c821ba..af7f7698a5f 100644 --- a/Tests/test_image_getextrema.py +++ b/Tests/test_image_getextrema.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageGetExtrema(PillowTestCase): diff --git a/Tests/test_image_getim.py b/Tests/test_image_getim.py index 6141877cdca..d498d392363 100644 --- a/Tests/test_image_getim.py +++ b/Tests/test_image_getim.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena, py3 +from helper import unittest, PillowTestCase, lena, py3 class TestImageGetIm(PillowTestCase): diff --git a/Tests/test_image_getpalette.py b/Tests/test_image_getpalette.py index 8b6804a5aee..0c399c432ca 100644 --- a/Tests/test_image_getpalette.py +++ b/Tests/test_image_getpalette.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageGetPalette(PillowTestCase): diff --git a/Tests/test_image_getpixel.py b/Tests/test_image_getpixel.py index 20be3bdece5..965233f94a7 100644 --- a/Tests/test_image_getpixel.py +++ b/Tests/test_image_getpixel.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_image_getprojection.py b/Tests/test_image_getprojection.py index 8c340847c23..262a21d4b90 100644 --- a/Tests/test_image_getprojection.py +++ b/Tests/test_image_getprojection.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_histogram.py b/Tests/test_image_histogram.py index 6fd203758fd..70f78a1fb1c 100644 --- a/Tests/test_image_histogram.py +++ b/Tests/test_image_histogram.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageHistogram(PillowTestCase): diff --git a/Tests/test_image_load.py b/Tests/test_image_load.py index 14cb76fdbf0..786cd6ad890 100644 --- a/Tests/test_image_load.py +++ b/Tests/test_image_load.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_mode.py b/Tests/test_image_mode.py index ba5e0810a3d..25c35c607be 100644 --- a/Tests/test_image_mode.py +++ b/Tests/test_image_mode.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_offset.py b/Tests/test_image_offset.py index 1b45fec4abe..09f12266faf 100644 --- a/Tests/test_image_offset.py +++ b/Tests/test_image_offset.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageOffset(PillowTestCase): diff --git a/Tests/test_image_point.py b/Tests/test_image_point.py index 1f3aaf44683..7b6cd4fc71d 100644 --- a/Tests/test_image_point.py +++ b/Tests/test_image_point.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena import sys diff --git a/Tests/test_image_putalpha.py b/Tests/test_image_putalpha.py index bb36b335e1a..85c7ac262db 100644 --- a/Tests/test_image_putalpha.py +++ b/Tests/test_image_putalpha.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_image_putdata.py b/Tests/test_image_putdata.py index d792adfe60d..c7c3115aa37 100644 --- a/Tests/test_image_putdata.py +++ b/Tests/test_image_putdata.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena import sys diff --git a/Tests/test_image_putpalette.py b/Tests/test_image_putpalette.py index 26ad09800e1..a77c1e565be 100644 --- a/Tests/test_image_putpalette.py +++ b/Tests/test_image_putpalette.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import ImagePalette diff --git a/Tests/test_image_putpixel.py b/Tests/test_image_putpixel.py index 1afc013c0fc..a7f5dc2bb5d 100644 --- a/Tests/test_image_putpixel.py +++ b/Tests/test_image_putpixel.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_quantize.py b/Tests/test_image_quantize.py index 63fe0cb21e9..2cbdac225fe 100644 --- a/Tests/test_image_quantize.py +++ b/Tests/test_image_quantize.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_resize.py b/Tests/test_image_resize.py index a200b17b4d6..6c9932e457b 100644 --- a/Tests/test_image_resize.py +++ b/Tests/test_image_resize.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageResize(PillowTestCase): diff --git a/Tests/test_image_rotate.py b/Tests/test_image_rotate.py index bb24ddf4f08..531fdd63f70 100644 --- a/Tests/test_image_rotate.py +++ b/Tests/test_image_rotate.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageRotate(PillowTestCase): diff --git a/Tests/test_image_split.py b/Tests/test_image_split.py index 284acd87ce6..343f4bf8e15 100644 --- a/Tests/test_image_split.py +++ b/Tests/test_image_split.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_thumbnail.py b/Tests/test_image_thumbnail.py index 6b33da31899..ee49be43eaa 100644 --- a/Tests/test_image_thumbnail.py +++ b/Tests/test_image_thumbnail.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena class TestImageThumbnail(PillowTestCase): diff --git a/Tests/test_image_tobitmap.py b/Tests/test_image_tobitmap.py index 93f01c9de40..56b5ef00146 100644 --- a/Tests/test_image_tobitmap.py +++ b/Tests/test_image_tobitmap.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena, fromstring +from helper import unittest, PillowTestCase, lena, fromstring class TestImageToBitmap(PillowTestCase): diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index b363444160a..1873ee9a4b7 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_image_transpose.py b/Tests/test_image_transpose.py index ec83aa3a62e..f13e54ee72b 100644 --- a/Tests/test_image_transpose.py +++ b/Tests/test_image_transpose.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_imagechops.py b/Tests/test_imagechops.py index fe377f86478..552314fd183 100644 --- a/Tests/test_imagechops.py +++ b/Tests/test_imagechops.py @@ -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 diff --git a/Tests/test_imagecms.py b/Tests/test_imagecms.py index f3f0791e5e8..152241f90ed 100644 --- a/Tests/test_imagecms.py +++ b/Tests/test_imagecms.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_imagecolor.py b/Tests/test_imagecolor.py index fce64876b2b..5d8944852ef 100644 --- a/Tests/test_imagecolor.py +++ b/Tests/test_imagecolor.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image from PIL import ImageColor diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py index 4610e2b0b52..b632da73bed 100644 --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -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 diff --git a/Tests/test_imageenhance.py b/Tests/test_imageenhance.py index eec26d768d5..433c49cf6a2 100644 --- a/Tests/test_imageenhance.py +++ b/Tests/test_imageenhance.py @@ -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 diff --git a/Tests/test_imagefile.py b/Tests/test_imagefile.py index 84976719504..d7f7f2a56ff 100644 --- a/Tests/test_imagefile.py +++ b/Tests/test_imagefile.py @@ -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 diff --git a/Tests/test_imagefileio.py b/Tests/test_imagefileio.py index 791207dca88..32ee0bc5e7a 100644 --- a/Tests/test_imagefileio.py +++ b/Tests/test_imagefileio.py @@ -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 diff --git a/Tests/test_imagefilter.py b/Tests/test_imagefilter.py index 3dcb1d14f82..f7edb409aaf 100644 --- a/Tests/test_imagefilter.py +++ b/Tests/test_imagefilter.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import ImageFilter diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index 927c80beeec..17cb38cc213 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image from PIL import ImageDraw diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index a6c50fb3188..2275d34a16d 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase try: from PIL import ImageGrab diff --git a/Tests/test_imagemath.py b/Tests/test_imagemath.py index 35d75dbbdb8..17d43d25ac3 100644 --- a/Tests/test_imagemath.py +++ b/Tests/test_imagemath.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image from PIL import ImageMath diff --git a/Tests/test_imagemode.py b/Tests/test_imagemode.py index 7febc697e1e..2c5730d740e 100644 --- a/Tests/test_imagemode.py +++ b/Tests/test_imagemode.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import ImageMode diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py index 299a7c618f6..a4a94ca4df8 100644 --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import ImageOps diff --git a/Tests/test_imageops_usm.py b/Tests/test_imageops_usm.py index 486b201ab36..be7a669da6e 100644 --- a/Tests/test_imageops_usm.py +++ b/Tests/test_imageops_usm.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image from PIL import ImageOps diff --git a/Tests/test_imagepalette.py b/Tests/test_imagepalette.py index 3ee7ee869ca..be82f4dcb46 100644 --- a/Tests/test_imagepalette.py +++ b/Tests/test_imagepalette.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import ImagePalette diff --git a/Tests/test_imagepath.py b/Tests/test_imagepath.py index c293e42256f..cd221b5cab4 100644 --- a/Tests/test_imagepath.py +++ b/Tests/test_imagepath.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import ImagePath diff --git a/Tests/test_imageqt.py b/Tests/test_imageqt.py index 549fc7fd6bd..fd50bf32087 100644 --- a/Tests/test_imageqt.py +++ b/Tests/test_imageqt.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena try: from PIL import ImageQt diff --git a/Tests/test_imagesequence.py b/Tests/test_imagesequence.py index 7f883820781..fd10e598923 100644 --- a/Tests/test_imagesequence.py +++ b/Tests/test_imagesequence.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import ImageSequence diff --git a/Tests/test_imageshow.py b/Tests/test_imageshow.py index 08b3ff18348..e94ae2d0a11 100644 --- a/Tests/test_imageshow.py +++ b/Tests/test_imageshow.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image from PIL import ImageShow diff --git a/Tests/test_imagestat.py b/Tests/test_imagestat.py index 7eded56cf97..4d30ff0230a 100644 --- a/Tests/test_imagestat.py +++ b/Tests/test_imagestat.py @@ -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 diff --git a/Tests/test_imagetk.py b/Tests/test_imagetk.py index b868096b23d..87a07e288f8 100644 --- a/Tests/test_imagetk.py +++ b/Tests/test_imagetk.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase class TestImageTk(PillowTestCase): diff --git a/Tests/test_imagetransform.py b/Tests/test_imagetransform.py index dfffafe542d..f5741df320a 100644 --- a/Tests/test_imagetransform.py +++ b/Tests/test_imagetransform.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image from PIL import ImageTransform diff --git a/Tests/test_imagewin.py b/Tests/test_imagewin.py index f22babbb33c..69dbdbe82a4 100644 --- a/Tests/test_imagewin.py +++ b/Tests/test_imagewin.py @@ -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 diff --git a/Tests/test_lib_image.py b/Tests/test_lib_image.py index c7ea4c70100..e0a903b00dc 100644 --- a/Tests/test_lib_image.py +++ b/Tests/test_lib_image.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_lib_pack.py b/Tests/test_lib_pack.py index c8ed39c405a..102835b58f3 100644 --- a/Tests/test_lib_pack.py +++ b/Tests/test_lib_pack.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, py3 +from helper import unittest, PillowTestCase, py3 from PIL import Image diff --git a/Tests/test_locale.py b/Tests/test_locale.py index 0465fb20779..9ef136bf968 100644 --- a/Tests/test_locale.py +++ b/Tests/test_locale.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_mode_i16.py b/Tests/test_mode_i16.py index d8e205b6606..b7dc76fb4be 100644 --- a/Tests/test_mode_i16.py +++ b/Tests/test_mode_i16.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index c3c0f7e907f..07c3e0c2142 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule, lena +from helper import unittest, PillowTestCase, lena from PIL import Image diff --git a/Tests/test_olefileio.py b/Tests/test_olefileio.py index f31302db176..1cff273a10a 100644 --- a/Tests/test_olefileio.py +++ b/Tests/test_olefileio.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase import datetime diff --git a/Tests/test_pickle.py b/Tests/test_pickle.py index 304baf96497..eae5eb6714e 100644 --- a/Tests/test_pickle.py +++ b/Tests/test_pickle.py @@ -1,4 +1,4 @@ -from helper import unittest, PillowTestCase, tearDownModule +from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_shell_injection.py b/Tests/test_shell_injection.py index eff03fd591d..ef80bfc9823 100644 --- a/Tests/test_shell_injection.py +++ b/Tests/test_shell_injection.py @@ -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