Pillow/Tests
Jon Dufresne 9175706300 Allow the olefile dependency to be optional
Support for plugins requiring olefile will not be loaded if it is not
installed. Allows library consumers to avoid installing this dependency
if they choose. Some library consumers have little interest in the
format support and would like to keep dependencies to a minimum.
2017-10-04 06:54:34 -07:00
..
fonts Added Noto font license [ci skip] 2017-06-21 14:00:15 -07:00
icc Corrected filename [ci skip] 2016-05-03 19:23:51 +10:00
images add unit tests 2017-09-29 09:15:21 +00:00
32bit_segfault_check.py Set executable flag on scripts with shebang line 2017-03-31 19:43:19 +11:00
bench_cffi_access.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
bench_get.py Flake8 fixes 2015-08-25 22:27:18 +10:00
check_fli_overflow.py Health fixes 2016-04-01 21:49:30 +11:00
check_icns_dos.py flake8 2014-08-28 14:44:19 +03:00
check_imaging_leaks.py Set executable flag on scripts with shebang line 2017-03-31 19:43:19 +11:00
check_j2k_dos.py flake8 2014-08-28 14:44:19 +03:00
check_j2k_leaks.py Removed or commented unused variables 2015-04-24 16:02:38 +10:00
check_j2k_overflow.py Replace try/except/fail pattern with TestCase.assertRaises() 2016-11-06 13:43:09 -08:00
check_jpeg_leaks.py Changed lines to be below 80 characters 2015-12-02 16:41:26 +11:00
check_large_memory_numpy.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
check_large_memory.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
check_libtiff_segfault.py Replace try/except/fail pattern with TestCase.assertRaises() 2016-11-06 13:43:09 -08:00
check_png_dos.py ignore large text blocks in PNG if LOAD_TRUNCATED_IMAGES is enabled 2016-06-20 17:33:10 +03:00
check_webp_leaks.py Removed or commented unused variables 2015-04-24 16:02:38 +10:00
createfontdatachunk.py Move so isn't installed globally 2017-07-27 14:12:28 +03:00
helper.py Improve assert_warning() error message for warn_class=None 2017-09-23 22:36:42 +03:00
import_all.py Flake8 fixes 2015-08-25 22:27:18 +10:00
make_hash.py Updated comments to use print as a function 2016-11-26 11:02:44 +11:00
README.rst Drop support for Python 2.6 2016-11-22 04:23:55 -08:00
test_000_sanity.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_binary.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_bmp_reference.py Replaced false assert with fail 2017-06-03 14:04:18 +10:00
test_box_blur.py ImageFilter.BoxBlur 2017-09-14 01:59:25 +03:00
test_core_resources.py clear_cache: number or blocks to keep 2017-09-23 04:20:53 +03:00
test_decompression_bomb.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_features.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_bmp.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_bufrstub.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_container.py Test ContainerIO for correctness 2017-03-05 00:46:30 +02:00
test_file_cur.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_dcx.py Changed EOFError tests 2017-09-30 13:33:06 +10:00
test_file_dds.py Add support for BC7 to DdsImagePlugin 2016-08-26 02:26:03 -05:00
test_file_eps.py Added expected result, renamed images 2017-09-09 12:01:38 +00:00
test_file_fitsstub.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_fli.py Changed EOFError tests 2017-09-30 13:33:06 +10:00
test_file_fpx.py Allow the olefile dependency to be optional 2017-10-04 06:54:34 -07:00
test_file_ftex.py Move DDS decoders to C 2016-08-25 19:27:48 -05:00
test_file_gbr.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_gif.py Changed EOFError tests 2017-09-30 13:33:06 +10:00
test_file_gimpgradient.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_file_gimppalette.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_gribstub.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_hdf5stub.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_icns.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_ico.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_im.py Changed EOFError tests 2017-09-30 13:33:06 +10:00
test_file_iptc.py Added tests 2017-03-03 19:45:55 +11:00
test_file_jpeg.py Merge pull request #2689 from radarhere/tests 2017-09-04 11:15:28 +01:00
test_file_jpeg2k.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_libtiff_small.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_file_libtiff.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_mcidas.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_mic.py Allow the olefile dependency to be optional 2017-10-04 06:54:34 -07:00
test_file_mpo.py Changed EOFError tests 2017-09-30 13:33:06 +10:00
test_file_msp.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_palm.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_pcd.py Health fixes 2016-04-01 21:49:30 +11:00
test_file_pcx.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_pdf.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_pixar.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_png.py Merge pull request #2634 from wiredfool/issue_2629 2017-09-04 11:23:57 +01:00
test_file_ppm.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_psd.py Added _min_frame property 2017-09-30 13:33:13 +10:00
test_file_sgi.py Removed test for YCbCr != 3 channels 2017-09-29 13:34:49 +00:00
test_file_spider.py Merge pull request #2647 from radarhere/spider 2017-09-09 10:23:45 +01:00
test_file_sun.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_tar.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_file_tga.py Test TGA RLE file 2016-04-21 17:49:35 +03:00
test_file_tiff_metadata.py added test for metadata count warning 2017-09-19 10:35:14 +00:00
test_file_tiff.py Changed EOFError tests 2017-09-30 13:33:06 +10:00
test_file_webp_alpha.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_file_webp_lossless.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_file_webp_metadata.py Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
test_file_webp.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_wmf.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_xbm.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_file_xpm.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_file_xvthumb.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_font_bdf.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_font_leaks.py test for font memory leaks 2017-09-04 09:58:52 +00:00
test_font_pcf.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_format_hsv.py use getchannel where is possible 2017-08-09 02:36:07 +03:00
test_format_lab.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_access.py Flake8 fixes 2017-04-20 21:14:23 +10:00
test_image_array.py Fixed typos 2016-08-31 20:12:07 +10:00
test_image_convert.py Merge pull request #2689 from radarhere/tests 2017-09-04 11:15:28 +01:00
test_image_copy.py Flake8 fixes 2017-04-20 21:14:23 +10:00
test_image_crop.py Flake8 fixes 2017-04-20 21:14:23 +10:00
test_image_draft.py protect .draft() from second call 2016-11-22 04:28:04 +03:00
test_image_filter.py ImageFilter.BoxBlur 2017-09-14 01:59:25 +03:00
test_image_frombytes.py Added tests 2017-09-01 20:36:51 +10:00
test_image_fromqimage.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_fromqpixmap.py Flake8 fixes 2017-04-20 21:14:23 +10:00
test_image_getbands.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_getbbox.py Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
test_image_getcolors.py Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
test_image_getdata.py Merge branch 'master' into rotation-pixel-center 2016-08-07 13:47:16 +03:00
test_image_getextrema.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_getim.py Drop support for Python 2.6 2016-11-22 04:23:55 -08:00
test_image_getpalette.py Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
test_image_getprojection.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_histogram.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_load.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_image_mode.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_paste.py Flake8 fixes 2017-04-20 21:14:23 +10:00
test_image_point.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_image_putalpha.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_putdata.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_putpalette.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_image_quantize.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_image_resample.py python api for resources 2017-09-18 01:41:39 +03:00
test_image_resize.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_image_rotate.py Flake8 fixes 2017-04-20 21:14:23 +10:00
test_image_split.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_thumbnail.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_tobitmap.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_tobytes.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_image_toqimage.py Flake8 fixes 2017-04-20 21:14:23 +10:00
test_image_toqpixmap.py Flake8 fixes 2017-04-20 21:14:23 +10:00
test_image_transform.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_image_transpose.py tests for transverse, add to docs 2017-09-11 23:00:35 +03:00
test_image.py Merge pull request #2738 from uploadcare/block-storage 2017-10-01 20:41:08 +01:00
test_imagechops.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_imagecms.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_imagecolor.py Remove unnecessary calls to dict.keys() 2017-05-28 09:55:38 -07:00
test_imagedraw.py Failing test for #2783 2017-10-04 11:09:52 +00:00
test_imageenhance.py use getchannel where is possible 2017-08-09 02:36:07 +03:00
test_imagefile.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_imagefont_bitmap.py Flake8 fixes 2015-12-31 07:27:27 +11:00
test_imagefont.py Merge pull request #2706 from wiredfool/issue_2666 2017-09-04 11:26:28 +01:00
test_imagefontctl.py test features in get size 2017-06-30 22:57:57 +01:00
test_imagegrab.py Removed unnecessary parameter 2017-06-03 13:56:23 +10:00
test_imagemath.py Replace type() equality checks with isinstance 2016-10-31 06:41:43 -07:00
test_imagemorph.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_imageops_usm.py DeprecationWarning tests 2017-09-14 02:49:05 +03:00
test_imageops.py Removed whitespace from blank lines 2016-09-03 12:23:42 +10:00
test_imagepalette.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_imagepath.py Replace try/except/fail pattern with TestCase.assertRaises() 2016-11-06 13:43:09 -08:00
test_imageqt.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_imagesequence.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_imageshow.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_imagestat.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_imagetk.py Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
test_imagewin_pointers.py Drop support for Python 2.6 2016-11-22 04:23:55 -08:00
test_imagewin.py Remove functions deprecated and warning since 2.0 (15 Mar 2013) and raising exceptions since 3.0 (1 Oct 2015) 2017-05-27 21:52:43 +03:00
test_lib_image.py Changed format of lambda calls 2017-09-01 21:05:40 +10:00
test_lib_pack.py Added L;16/B pack functions 2017-09-29 13:41:39 +00:00
test_locale.py Added future print_function imports 2016-11-26 11:05:56 +11:00
test_map.py Vulnerable map function is not called on windows 2016-10-03 07:42:48 -07:00
test_mode_i16.py Revert little-endian byte order for "I" and "F" rawmodes 2017-08-28 19:02:15 +03:00
test_numpy.py Move test_no_resource_warning_for_numpy_array to test_numpy so it can be skipped easily 2017-09-23 22:39:10 +03:00
test_pickle.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_psdraw.py Added anchor to readthedocs URL 2017-02-11 12:47:10 +11:00
test_pyroma.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_scipy.py Fix ValueError: invalid version number '1.0.0rc1' 2017-09-30 22:15:28 -07:00
test_shell_injection.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
test_tiff_ifdrational.py Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
test_util.py remove end of file banner from all files 2016-07-10 14:11:28 +03:00
threaded_save.py Added missing future print imports and removed unnecessary imports 2015-05-23 20:28:41 +10:00
versions.py Added missing future print imports and removed unnecessary imports 2015-05-23 20:28:41 +10:00

Pillow Tests
============

Test scripts are named ``test_xxx.py`` and use the ``unittest`` module. A base class and helper functions can be found in ``helper.py``.

Dependencies
-----------

Install::

    pip install coverage nose

Execution
---------

**If Pillow has been built in-place**

To run an individual test::

    python Tests/test_image.py

Run all the tests from the root of the Pillow source distribution::

    nosetests -vx Tests/test_*.py

Or with coverage::

    coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py
    coverage report
    coverage html
    open htmlcov/index.html

**If Pillow has been installed**

To run an individual test::

    ./test-installed.py Tests/test_image.py

Run all the tests from the root of the Pillow source distribution::

    ./test-installed.py