mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 02:36:17 +03:00
Introduce isort to automate import ordering and formatting (#3954)
Introduce isort to automate import ordering and formatting
This commit is contained in:
commit
1ab5670eb1
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from PIL import Image
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
if sys.maxsize < 2 ** 32:
|
if sys.maxsize < 2 ** 32:
|
||||||
im = Image.new("L", (999999, 999999), 0)
|
im = Image.new("L", (999999, 999999), 0)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
import time
|
||||||
|
|
||||||
# Not running this test by default. No DOS against Travis CI.
|
|
||||||
|
|
||||||
from PIL import PyAccess
|
from PIL import PyAccess
|
||||||
|
|
||||||
import time
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
|
# Not running this test by default. No DOS against Travis CI.
|
||||||
|
|
||||||
|
|
||||||
def iterate_get(size, access):
|
def iterate_get(size, access):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from . import helper
|
import sys
|
||||||
import timeit
|
import timeit
|
||||||
|
|
||||||
import sys
|
from . import helper
|
||||||
|
|
||||||
sys.path.insert(0, ".")
|
sys.path.insert(0, ".")
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/fli_overflow.fli"
|
TEST_FILE = "Tests/images/fli_overflow.fli"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# Tests potential DOS of IcnsImagePlugin with 0 length block.
|
# Tests potential DOS of IcnsImagePlugin with 0 length block.
|
||||||
# Run from anywhere that PIL is importable.
|
# Run from anywhere that PIL is importable.
|
||||||
|
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
from io import BytesIO
|
|
||||||
|
|
||||||
if py3:
|
if py3:
|
||||||
Image.open(BytesIO(bytes("icns\x00\x00\x00\x10hang\x00\x00\x00\x00", "latin-1")))
|
Image.open(BytesIO(bytes("icns\x00\x00\x00\x10hang\x00\x00\x00\x00", "latin-1")))
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
min_iterations = 100
|
min_iterations = 100
|
||||||
max_iterations = 10000
|
max_iterations = 10000
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# Tests potential DOS of Jpeg2kImagePlugin with 0 length block.
|
# Tests potential DOS of Jpeg2kImagePlugin with 0 length block.
|
||||||
# Run from anywhere that PIL is importable.
|
# Run from anywhere that PIL is importable.
|
||||||
|
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
from io import BytesIO
|
|
||||||
|
|
||||||
if py3:
|
if py3:
|
||||||
Image.open(
|
Image.open(
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
import sys
|
import sys
|
||||||
from PIL import Image
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
# Limits for testing the leak
|
# Limits for testing the leak
|
||||||
mem_limit = 1024 * 1048576
|
mem_limit = 1024 * 1048576
|
||||||
stack_size = 8 * 1048576
|
stack_size = 8 * 1048576
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
|
|
||||||
class TestJ2kEncodeOverflow(PillowTestCase):
|
class TestJ2kEncodeOverflow(PillowTestCase):
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
|
||||||
from io import BytesIO
|
|
||||||
import sys
|
import sys
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
iterations = 5000
|
iterations = 5000
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from .helper import unittest, PillowTestCase
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
# This test is not run automatically.
|
# This test is not run automatically.
|
||||||
#
|
#
|
||||||
|
@ -11,7 +13,6 @@ from .helper import unittest, PillowTestCase
|
||||||
# Raspberry Pis). 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 and 3.2.
|
# 2.7 and 3.2.
|
||||||
|
|
||||||
from PIL import Image
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import numpy
|
import numpy
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from .helper import unittest, PillowTestCase
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
# This test is not run automatically.
|
# This test is not run automatically.
|
||||||
#
|
#
|
||||||
|
@ -10,7 +12,6 @@ from .helper import unittest, PillowTestCase
|
||||||
# on any 32-bit machine, as well as any smallish things (like
|
# on any 32-bit machine, as well as any smallish things (like
|
||||||
# Raspberry Pis).
|
# Raspberry Pis).
|
||||||
|
|
||||||
from PIL import Image
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/libtiff_segfault.tif"
|
TEST_FILE = "Tests/images/libtiff_segfault.tif"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
from PIL import Image, PngImagePlugin, ImageFile
|
|
||||||
from io import BytesIO
|
|
||||||
import zlib
|
import zlib
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
|
from PIL import Image, ImageFile, PngImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/png_decompression_dos.png"
|
TEST_FILE = "Tests/images/png_decompression_dos.png"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
Helper functions.
|
Helper functions.
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import os
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from PIL import Image, ImageMath
|
from PIL import Image, ImageMath
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,8 @@ from __future__ import print_function
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import traceback
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import traceback
|
||||||
|
|
||||||
sys.path.insert(0, ".")
|
sys.path.insert(0, ".")
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
import PIL
|
import PIL
|
||||||
import PIL.Image
|
import PIL.Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestSanity(PillowTestCase):
|
class TestSanity(PillowTestCase):
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import _binary
|
from PIL import _binary
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestBinary(PillowTestCase):
|
class TestBinary(PillowTestCase):
|
||||||
def test_standard(self):
|
def test_standard(self):
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
import os
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
import os
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
base = os.path.join("Tests", "images", "bmp")
|
base = os.path.join("Tests", "images", "bmp")
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image, ImageFilter
|
from PIL import Image, ImageFilter
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
sample = Image.new("L", (7, 5))
|
sample = Image.new("L", (7, 5))
|
||||||
# fmt: off
|
# fmt: off
|
||||||
|
|
|
@ -3,7 +3,8 @@ from __future__ import division
|
||||||
from array import array
|
from array import array
|
||||||
|
|
||||||
from PIL import Image, ImageFilter
|
from PIL import Image, ImageFilter
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import numpy
|
import numpy
|
||||||
|
|
|
@ -2,9 +2,9 @@ from __future__ import division, print_function
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
is_pypy = hasattr(sys, "pypy_version_info")
|
is_pypy = hasattr(sys, "pypy_version_info")
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/hopper.ppm"
|
TEST_FILE = "Tests/images/hopper.ppm"
|
||||||
|
|
||||||
ORIGINAL_LIMIT = Image.MAX_IMAGE_PIXELS
|
ORIGINAL_LIMIT = Image.MAX_IMAGE_PIXELS
|
||||||
|
|
|
@ -2,10 +2,10 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import io
|
import io
|
||||||
|
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
|
|
||||||
from PIL import features
|
from PIL import features
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import _webp
|
from PIL import _webp
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, BmpImagePlugin
|
|
||||||
import io
|
import io
|
||||||
|
|
||||||
|
from PIL import BmpImagePlugin, Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestFileBmp(PillowTestCase):
|
class TestFileBmp(PillowTestCase):
|
||||||
def roundtrip(self, im):
|
def roundtrip(self, im):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import BufrStubImagePlugin, Image
|
from PIL import BufrStubImagePlugin, Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/gfs.t06z.rassda.tm00.bufr_d"
|
TEST_FILE = "Tests/images/gfs.t06z.rassda.tm00.bufr_d"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from .helper import PillowTestCase, hopper
|
from PIL import ContainerIO, Image
|
||||||
|
|
||||||
from PIL import Image
|
from .helper import PillowTestCase, hopper
|
||||||
from PIL import ContainerIO
|
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/dummy.container"
|
TEST_FILE = "Tests/images/dummy.container"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from .helper import PillowTestCase
|
from PIL import CurImagePlugin, Image
|
||||||
|
|
||||||
from PIL import Image, CurImagePlugin
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/deerstalker.cur"
|
TEST_FILE = "Tests/images/deerstalker.cur"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from .helper import PillowTestCase, hopper
|
from PIL import DcxImagePlugin, Image
|
||||||
|
|
||||||
from PIL import Image, DcxImagePlugin
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
# Created with ImageMagick: convert hopper.ppm hopper.dcx
|
# Created with ImageMagick: convert hopper.ppm hopper.dcx
|
||||||
TEST_FILE = "Tests/images/hopper.dcx"
|
TEST_FILE = "Tests/images/hopper.dcx"
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
|
from PIL import DdsImagePlugin, Image
|
||||||
|
|
||||||
from .helper import PillowTestCase
|
from .helper import PillowTestCase
|
||||||
from PIL import Image, DdsImagePlugin
|
|
||||||
|
|
||||||
TEST_FILE_DXT1 = "Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds"
|
TEST_FILE_DXT1 = "Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds"
|
||||||
TEST_FILE_DXT3 = "Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.dds"
|
TEST_FILE_DXT3 = "Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.dds"
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, EpsImagePlugin
|
|
||||||
import io
|
import io
|
||||||
|
|
||||||
|
from PIL import EpsImagePlugin, Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
HAS_GHOSTSCRIPT = EpsImagePlugin.has_ghostscript()
|
HAS_GHOSTSCRIPT = EpsImagePlugin.has_ghostscript()
|
||||||
|
|
||||||
# Our two EPS test files (they are identical except for their bounding boxes)
|
# Our two EPS test files (they are identical except for their bounding boxes)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import FitsStubImagePlugin, Image
|
from PIL import FitsStubImagePlugin, Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/hopper.fits"
|
TEST_FILE = "Tests/images/hopper.fits"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from .helper import PillowTestCase
|
from PIL import FliImagePlugin, Image
|
||||||
|
|
||||||
from PIL import Image, FliImagePlugin
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
# created as an export of a palette image from Gimp2.6
|
# created as an export of a palette image from Gimp2.6
|
||||||
# save as...-> hopper.fli, default options.
|
# save as...-> hopper.fli, default options.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from .helper import unittest, PillowTestCase
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import FpxImagePlugin
|
from PIL import FpxImagePlugin
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestFileFtex(PillowTestCase):
|
class TestFileFtex(PillowTestCase):
|
||||||
def test_load_raw(self):
|
def test_load_raw(self):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from .helper import PillowTestCase
|
from PIL import GbrImagePlugin, Image
|
||||||
|
|
||||||
from PIL import Image, GbrImagePlugin
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestFileGbr(PillowTestCase):
|
class TestFileGbr(PillowTestCase):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import GdImageFile
|
from PIL import GdImageFile
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
TEST_GD_FILE = "Tests/images/hopper.gd"
|
TEST_GD_FILE = "Tests/images/hopper.gd"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper, netpbm_available
|
|
||||||
|
|
||||||
from PIL import Image, ImagePalette, GifImagePlugin, ImageDraw
|
|
||||||
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
|
from PIL import GifImagePlugin, Image, ImageDraw, ImagePalette
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper, netpbm_available, unittest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import _webp
|
from PIL import _webp
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import GimpGradientFile
|
from PIL import GimpGradientFile
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestImage(PillowTestCase):
|
class TestImage(PillowTestCase):
|
||||||
def test_linear_pos_le_middle(self):
|
def test_linear_pos_le_middle(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL.GimpPaletteFile import GimpPaletteFile
|
from PIL.GimpPaletteFile import GimpPaletteFile
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestImage(PillowTestCase):
|
class TestImage(PillowTestCase):
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import GribStubImagePlugin, Image
|
from PIL import GribStubImagePlugin, Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/WAlaska.wind.7days.grb"
|
TEST_FILE = "Tests/images/WAlaska.wind.7days.grb"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Hdf5StubImagePlugin, Image
|
from PIL import Hdf5StubImagePlugin, Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/hdf5.h5"
|
TEST_FILE = "Tests/images/hdf5.h5"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from .helper import unittest, PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image, IcnsImagePlugin
|
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from PIL import IcnsImagePlugin, Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, unittest
|
||||||
|
|
||||||
# sample icon file
|
# sample icon file
|
||||||
TEST_FILE = "Tests/images/pillow.icns"
|
TEST_FILE = "Tests/images/pillow.icns"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
import io
|
import io
|
||||||
from PIL import Image, ImageDraw, IcoImagePlugin
|
|
||||||
|
from PIL import IcoImagePlugin, Image, ImageDraw
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_ICO_FILE = "Tests/images/hopper.ico"
|
TEST_ICO_FILE = "Tests/images/hopper.ico"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, ImImagePlugin
|
from PIL import Image, ImImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
# sample im
|
# sample im
|
||||||
TEST_IM = "Tests/images/hopper.im"
|
TEST_IM = "Tests/images/hopper.im"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, IptcImagePlugin
|
from PIL import Image, IptcImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/iptc.jpg"
|
TEST_FILE = "Tests/images/iptc.jpg"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
|
||||||
from .helper import djpeg_available, cjpeg_available
|
|
||||||
|
|
||||||
from io import BytesIO
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image, ImageFile, JpegImagePlugin
|
||||||
from PIL import ImageFile
|
|
||||||
from PIL import JpegImagePlugin
|
from .helper import PillowTestCase, cjpeg_available, djpeg_available, hopper, unittest
|
||||||
|
|
||||||
codecs = dir(Image.core)
|
codecs = dir(Image.core)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from .helper import PillowTestCase
|
from io import BytesIO
|
||||||
|
|
||||||
from PIL import Image, Jpeg2KImagePlugin
|
from PIL import Image, Jpeg2KImagePlugin
|
||||||
from io import BytesIO
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
codecs = dir(Image.core)
|
codecs = dir(Image.core)
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
from PIL import features
|
|
||||||
from PIL._util import py3
|
|
||||||
|
|
||||||
|
import distutils.version
|
||||||
|
import io
|
||||||
|
import itertools
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from ctypes import c_float
|
from ctypes import c_float
|
||||||
import io
|
|
||||||
import logging
|
|
||||||
import itertools
|
|
||||||
import os
|
|
||||||
import distutils.version
|
|
||||||
|
|
||||||
from PIL import Image, TiffImagePlugin, TiffTags
|
from PIL import Image, TiffImagePlugin, TiffTags, features
|
||||||
|
from PIL._util import py3
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image, McIdasImagePlugin
|
from PIL import Image, McIdasImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestFileMcIdas(PillowTestCase):
|
class TestFileMcIdas(PillowTestCase):
|
||||||
def test_invalid_file(self):
|
def test_invalid_file(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, ImagePalette, features
|
from PIL import Image, ImagePalette, features
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import MicImagePlugin
|
from PIL import MicImagePlugin
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
test_files = ["Tests/images/sugarshack.mpo", "Tests/images/frozenpond.mpo"]
|
test_files = ["Tests/images/sugarshack.mpo", "Tests/images/frozenpond.mpo"]
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
import os
|
||||||
|
|
||||||
from PIL import Image, MspImagePlugin
|
from PIL import Image, MspImagePlugin
|
||||||
|
|
||||||
import os
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/hopper.msp"
|
TEST_FILE = "Tests/images/hopper.msp"
|
||||||
EXTRA_DIR = "Tests/images/picins"
|
EXTRA_DIR = "Tests/images/picins"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper, imagemagick_available
|
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper, imagemagick_available
|
||||||
|
|
||||||
|
|
||||||
class TestFilePalm(PillowTestCase):
|
class TestFilePalm(PillowTestCase):
|
||||||
_roundtrip = imagemagick_available()
|
_roundtrip = imagemagick_available()
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestFilePcd(PillowTestCase):
|
class TestFilePcd(PillowTestCase):
|
||||||
def test_load_raw(self):
|
def test_load_raw(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, ImageFile, PcxImagePlugin
|
from PIL import Image, ImageFile, PcxImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestFilePcx(PillowTestCase):
|
class TestFilePcx(PillowTestCase):
|
||||||
def _roundtrip(self, im):
|
def _roundtrip(self, im):
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
from PIL import Image, PdfParser
|
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from PIL import Image, PdfParser
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestFilePdf(PillowTestCase):
|
class TestFilePdf(PillowTestCase):
|
||||||
def helper_save_as_pdf(self, mode, **kwargs):
|
def helper_save_as_pdf(self, mode, **kwargs):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import hopper, PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image, PixarImagePlugin
|
from PIL import Image, PixarImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/hopper.pxr"
|
TEST_FILE = "Tests/images/hopper.pxr"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
from .helper import unittest, PillowTestCase, PillowLeakTestCase, hopper
|
import sys
|
||||||
|
import zlib
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
from PIL import Image, ImageFile, PngImagePlugin
|
from PIL import Image, ImageFile, PngImagePlugin
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
|
|
||||||
from io import BytesIO
|
from .helper import PillowLeakTestCase, PillowTestCase, hopper, unittest
|
||||||
import zlib
|
|
||||||
import sys
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import _webp
|
from PIL import _webp
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
# sample ppm stream
|
# sample ppm stream
|
||||||
test_file = "Tests/images/hopper.ppm"
|
test_file = "Tests/images/hopper.ppm"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import hopper, PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image, PsdImagePlugin
|
from PIL import Image, PsdImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
test_file = "Tests/images/hopper.psd"
|
test_file = "Tests/images/hopper.psd"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, SgiImagePlugin
|
from PIL import Image, SgiImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestFileSgi(PillowTestCase):
|
class TestFileSgi(PillowTestCase):
|
||||||
def test_rgb(self):
|
def test_rgb(self):
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
|
||||||
from PIL import ImageSequence
|
|
||||||
from PIL import SpiderImagePlugin
|
|
||||||
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
from PIL import Image, ImageSequence, SpiderImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/hopper.spider"
|
TEST_FILE = "Tests/images/hopper.spider"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
import os
|
||||||
|
|
||||||
from PIL import Image, SunImagePlugin
|
from PIL import Image, SunImagePlugin
|
||||||
|
|
||||||
import os
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
EXTRA_DIR = "Tests/images/sunraster"
|
EXTRA_DIR = "Tests/images/sunraster"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image, TarIO
|
from PIL import Image, TarIO
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
codecs = dir(Image.core)
|
codecs = dir(Image.core)
|
||||||
|
|
||||||
# Sample tar archive
|
# Sample tar archive
|
||||||
|
|
|
@ -2,10 +2,9 @@ import os
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from itertools import product
|
from itertools import product
|
||||||
|
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
_TGA_DIR = os.path.join("Tests", "images", "tga")
|
_TGA_DIR = os.path.join("Tests", "images", "tga")
|
||||||
_TGA_DIR_COMMON = os.path.join(_TGA_DIR, "common")
|
_TGA_DIR_COMMON = os.path.join(_TGA_DIR, "common")
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import logging
|
import logging
|
||||||
from io import BytesIO
|
|
||||||
import sys
|
import sys
|
||||||
|
from io import BytesIO
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, TiffImagePlugin, features
|
from PIL import Image, TiffImagePlugin, features
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
from PIL.TiffImagePlugin import X_RESOLUTION, Y_RESOLUTION, RESOLUTION_UNIT
|
from PIL.TiffImagePlugin import RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import io
|
import io
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, TiffImagePlugin, TiffTags
|
from PIL import Image, TiffImagePlugin, TiffTags
|
||||||
from PIL.TiffImagePlugin import _limit_rational, IFDRational
|
from PIL.TiffImagePlugin import IFDRational, _limit_rational
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
tag_ids = {info.name: info.value for info in TiffTags.TAGS_V2.values()}
|
tag_ids = {info.name: info.value for info in TiffTags.TAGS_V2.values()}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import WalImageFile
|
from PIL import WalImageFile
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestFileWal(PillowTestCase):
|
class TestFileWal(PillowTestCase):
|
||||||
def test_open(self):
|
def test_open(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, WebPImagePlugin
|
from PIL import Image, WebPImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import _webp
|
from PIL import _webp
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import _webp
|
from PIL import _webp
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import _webp
|
from PIL import _webp
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import _webp
|
from PIL import _webp
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PIL import _webp
|
from PIL import _webp
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from .helper import PillowTestCase, hopper
|
from PIL import Image, WmfImagePlugin
|
||||||
|
|
||||||
from PIL import Image
|
from .helper import PillowTestCase, hopper
|
||||||
from PIL import WmfImagePlugin
|
|
||||||
|
|
||||||
|
|
||||||
class TestFileWmf(PillowTestCase):
|
class TestFileWmf(PillowTestCase):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
PIL151 = b"""
|
PIL151 = b"""
|
||||||
#define basic_width 32
|
#define basic_width 32
|
||||||
#define basic_height 32
|
#define basic_height 32
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, XpmImagePlugin
|
from PIL import Image, XpmImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/hopper.xpm"
|
TEST_FILE = "Tests/images/hopper.xpm"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import hopper, PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image, XVThumbImagePlugin
|
from PIL import Image, XVThumbImagePlugin
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
TEST_FILE = "Tests/images/hopper.p7"
|
TEST_FILE = "Tests/images/hopper.p7"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from .helper import PillowTestCase
|
from PIL import BdfFontFile, FontFile
|
||||||
|
|
||||||
from PIL import FontFile, BdfFontFile
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
filename = "Tests/images/courB08.bdf"
|
filename = "Tests/images/courB08.bdf"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from .helper import unittest, PillowLeakTestCase
|
|
||||||
import sys
|
import sys
|
||||||
from PIL import Image, features, ImageDraw, ImageFont
|
|
||||||
|
from PIL import Image, ImageDraw, ImageFont, features
|
||||||
|
|
||||||
|
from .helper import PillowLeakTestCase, unittest
|
||||||
|
|
||||||
|
|
||||||
@unittest.skipIf(sys.platform.startswith("win32"), "requires Unix or macOS")
|
@unittest.skipIf(sys.platform.startswith("win32"), "requires Unix or macOS")
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
from .helper import PillowTestCase
|
from PIL import FontFile, Image, ImageDraw, ImageFont, PcfFontFile
|
||||||
|
|
||||||
from PIL import Image, FontFile, PcfFontFile
|
|
||||||
from PIL import ImageFont, ImageDraw
|
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
codecs = dir(Image.core)
|
codecs = dir(Image.core)
|
||||||
|
|
||||||
fontname = "Tests/fonts/10x20-ISO8859-1.pcf"
|
fontname = "Tests/fonts/10x20-ISO8859-1.pcf"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from .helper import PillowTestCase, hopper
|
import colorsys
|
||||||
|
import itertools
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
|
|
||||||
import colorsys
|
from .helper import PillowTestCase, hopper
|
||||||
import itertools
|
|
||||||
|
|
||||||
|
|
||||||
class TestFormatHSV(PillowTestCase):
|
class TestFormatHSV(PillowTestCase):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestFormatLab(PillowTestCase):
|
class TestFormatLab(PillowTestCase):
|
||||||
def test_white(self):
|
def test_white(self):
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper
|
import os
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
import os
|
|
||||||
import sys
|
from .helper import PillowTestCase, hopper, unittest
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
|
||||||
class TestImage(PillowTestCase):
|
class TestImage(PillowTestCase):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
from .helper import unittest, PillowTestCase, hopper, on_appveyor
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
import sys
|
|
||||||
import os
|
from .helper import PillowTestCase, hopper, on_appveyor, unittest
|
||||||
|
|
||||||
# CFFI imports pycparser which doesn't support PYTHONOPTIMIZE=2
|
# CFFI imports pycparser which doesn't support PYTHONOPTIMIZE=2
|
||||||
# https://github.com/eliben/pycparser/pull/198#issuecomment-317001670
|
# https://github.com/eliben/pycparser/pull/198#issuecomment-317001670
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
im = hopper().resize((128, 100))
|
im = hopper().resize((128, 100))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageConvert(PillowTestCase):
|
class TestImageConvert(PillowTestCase):
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from .helper import PillowTestCase, hopper
|
import copy
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
import copy
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageCopy(PillowTestCase):
|
class TestImageCopy(PillowTestCase):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageCrop(PillowTestCase):
|
class TestImageCrop(PillowTestCase):
|
||||||
def test_crop(self):
|
def test_crop(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, fromstring, tostring
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, fromstring, tostring
|
||||||
|
|
||||||
|
|
||||||
class TestImageDraft(PillowTestCase):
|
class TestImageDraft(PillowTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image, ImageFilter
|
from PIL import Image, ImageFilter
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageFilter(PillowTestCase):
|
class TestImageFilter(PillowTestCase):
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageFromBytes(PillowTestCase):
|
class TestImageFromBytes(PillowTestCase):
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
from PIL import Image, ImageQt
|
||||||
|
|
||||||
from .helper import PillowTestCase, hopper
|
from .helper import PillowTestCase, hopper
|
||||||
from .test_imageqt import PillowQtTestCase
|
from .test_imageqt import PillowQtTestCase
|
||||||
|
|
||||||
from PIL import ImageQt, Image
|
|
||||||
|
|
||||||
|
|
||||||
class TestFromQImage(PillowQtTestCase, PillowTestCase):
|
class TestFromQImage(PillowQtTestCase, PillowTestCase):
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestImageGetBands(PillowTestCase):
|
class TestImageGetBands(PillowTestCase):
|
||||||
def test_getbands(self):
|
def test_getbands(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageGetBbox(PillowTestCase):
|
class TestImageGetBbox(PillowTestCase):
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
from .helper import PillowTestCase, hopper
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
from PIL._util import py3
|
from PIL._util import py3
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageGetIm(PillowTestCase):
|
class TestImageGetIm(PillowTestCase):
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from .helper import PillowTestCase, hopper
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageGetProjection(PillowTestCase):
|
class TestImageGetProjection(PillowTestCase):
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from .helper import PillowTestCase, hopper
|
import os
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
import os
|
from .helper import PillowTestCase, hopper
|
||||||
|
|
||||||
|
|
||||||
class TestImageLoad(PillowTestCase):
|
class TestImageLoad(PillowTestCase):
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user