diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index 56b115f30..6c4d77b19 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -84,7 +84,6 @@ def Ghostscript(tile, size, fp, scale=1): float((72.0 * size[1]) / (bbox[3]-bbox[1]))) # print("Ghostscript", scale, size, orig_size, bbox, orig_bbox, res) - import os import subprocess import tempfile diff --git a/Tests/helper.py b/Tests/helper.py index cbfad6f03..e6e5eee79 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -167,7 +167,6 @@ class PillowTestCase(unittest.TestCase): outfile = self.tempfile("temp.png") if command_succeeds([IMCONVERT, f, outfile]): - from PIL import Image return Image.open(outfile) raise IOError() @@ -179,7 +178,6 @@ py3 = (sys.version_info >= (3, 0)) def fromstring(data): from io import BytesIO - from PIL import Image return Image.open(BytesIO(data)) @@ -191,7 +189,6 @@ def tostring(im, string_format, **options): def hopper(mode=None, cache={}): - from PIL import Image if mode is None: # Always return fresh not-yet-loaded version of image. # Operations on not-yet-loaded images is separate class of errors diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index d987f6851..7b01bcbd3 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -90,8 +90,6 @@ class TestFileGif(PillowTestCase): check(256, 511, 256) def test_optimize_full_l(self): - from io import BytesIO - im = Image.frombytes("L", (16, 16), bytes(bytearray(range(256)))) test_file = BytesIO() im.save(test_file, "GIF", optimize=True) @@ -425,7 +423,7 @@ class TestFileGif(PillowTestCase): reloaded = Image.open(out) self.assertEqual(reloaded.info['transparency'], 253) - + if __name__ == '__main__': unittest.main()